diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 1997-08-02 12:11:40 +0000 |
---|---|---|
committer | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 1997-08-02 12:11:40 +0000 |
commit | a46ebb0168e9d883829442a0a13d0bebb542d388 (patch) | |
tree | addee7caadf4c75dfb73df56b65a4af63c4c9d07 | |
parent | 796580d8a6b686c00dc7adac2b7fa0dfdcb978d4 (diff) |
(compare_constant_1, case STRING_CST): Compare TYPE_MODE.
(record_constant_1, case STRING_CST): Record TYPE_MODE.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@14606 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/varasm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index e730a275f0f..3f7251308b0 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), |