aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-10-19 03:19:18 +0000
committerRichard Stallman <rms@gnu.org>1993-10-19 03:19:18 +0000
commitb4d4e33ddd745043583cbd4e05226dc441ac57bd (patch)
tree6f5c94a2c7f42e717116179fb5d0eec7a45afeba
parent2a23b99d28e5dd21731a486c6e085a3a0879cd20 (diff)
downloadgcc-b4d4e33ddd745043583cbd4e05226dc441ac57bd.zip
gcc-b4d4e33ddd745043583cbd4e05226dc441ac57bd.tar.gz
gcc-b4d4e33ddd745043583cbd4e05226dc441ac57bd.tar.bz2
(finish_decl): After preserve_initializer call, set
TREE_PERMANENT bit in initializer. From-SVN: r5800
-rw-r--r--gcc/c-decl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f8a52a31..888f9be 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3565,7 +3565,14 @@ finish_decl (decl, init, asmspec_tree)
initializer instead of discarding it so that we can optimize
references to it. */
if (TREE_STATIC (decl) && TREE_READONLY (decl))
- preserve_initializer ();
+ {
+ preserve_initializer ();
+ /* Hack? Set the permanent bit for something that is permanent,
+ but not on the permenent obstack, so as to convince
+ output_constant_def to make its rtl on the permanent
+ obstack. */
+ TREE_PERMANENT (DECL_INITIAL (decl)) = 1;
+ }
else
DECL_INITIAL (decl) = error_mark_node;
}