]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(compare_constant_1, case STRING_CST): Compare TYPE_MODE.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 12:11:40 +0000 (08:11 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 12:11:40 +0000 (08:11 -0400)
(record_constant_1, case STRING_CST): Record TYPE_MODE.

From-SVN: r14606

gcc/varasm.c

index e730a275f0fb8425032ffa1bc96008c5c76e3b3e..3f7251308b02e21d6fbd385fa8387b485a121c58 100644 (file)
@@ -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),