aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-08-02 08:11:40 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-08-02 08:11:40 -0400
commitf163668c0d447532a952d1d0a563713186337bb0 (patch)
treeaddee7caadf4c75dfb73df56b65a4af63c4c9d07 /gcc/varasm.c
parent2cde2255e04bf49aff9d4d9a0283a336906f22fe (diff)
downloadgcc-f163668c0d447532a952d1d0a563713186337bb0.zip
gcc-f163668c0d447532a952d1d0a563713186337bb0.tar.gz
gcc-f163668c0d447532a952d1d0a563713186337bb0.tar.bz2
(compare_constant_1, case STRING_CST): Compare TYPE_MODE.
(record_constant_1, case STRING_CST): Record TYPE_MODE. From-SVN: r14606
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index e730a27..3f72513 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2533,6 +2533,9 @@ compare_constant_1 (exp, p)
if (flag_writable_strings)
return 0;
+ if (*p++ != TYPE_MODE (TREE_TYPE (exp)))
+ return 0;
+
strp = TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp);
if (bcmp ((char *) &TREE_STRING_LENGTH (exp), p,
@@ -2708,6 +2711,7 @@ record_constant_1 (exp)
if (flag_writable_strings)
return;
+ obstack_1grow (&permanent_obstack, TYPE_MODE (TREE_TYPE (exp)));
strp = TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp);
obstack_grow (&permanent_obstack, (char *) &TREE_STRING_LENGTH (exp),