Commit b4d4e33d by Richard Stallman

(finish_decl): After preserve_initializer call, set

TREE_PERMANENT bit in initializer.

From-SVN: r5800
parent 2a23b99d
...@@ -3565,7 +3565,14 @@ finish_decl (decl, init, asmspec_tree) ...@@ -3565,7 +3565,14 @@ finish_decl (decl, init, asmspec_tree)
initializer instead of discarding it so that we can optimize initializer instead of discarding it so that we can optimize
references to it. */ references to it. */
if (TREE_STATIC (decl) && TREE_READONLY (decl)) 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 else
DECL_INITIAL (decl) = error_mark_node; DECL_INITIAL (decl) = error_mark_node;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment