summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-12 21:51:03 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-12 21:51:03 +0000
commit43e36bfbf60a1f64b812bfacddf2603f7e088ee9 (patch)
treedbb95dd46733fbf5b9eb43a800dbd92b696cdb61
parentc2c3fd2498db32a99024a8de72f2d8e01b630b56 (diff)
downloadppe42-gcc-43e36bfbf60a1f64b812bfacddf2603f7e088ee9.tar.gz
ppe42-gcc-43e36bfbf60a1f64b812bfacddf2603f7e088ee9.zip
* passes.c (rest_of_decl_compilation): Don't defer call of
assemble_variable if its DECL_RTL is already set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84576 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/passes.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 489ca19a8a5..96b391fb8c8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * passes.c (rest_of_decl_compilation): Don't defer call of
+ assemble_variable if its DECL_RTL is already set.
+
2004-07-12 Sebastian Pop <pop@cri.ensmp.fr>
* cfgloop.h (struct loop): Add nb_iterations field.
diff --git a/gcc/passes.c b/gcc/passes.c
index 0e85c1c57bc..52b71a36463 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -370,7 +370,14 @@ rest_of_decl_compilation (tree decl,
&& !DECL_EXTERNAL (decl))
{
if (flag_unit_at_a_time && !cgraph_global_info_ready
- && TREE_CODE (decl) != FUNCTION_DECL && top_level)
+ && TREE_CODE (decl) != FUNCTION_DECL && top_level
+ /* If we defer processing of decls that have had their
+ DECL_RTL set above (say, in make_decl_rtl),
+ check_global_declarations() will clear it before
+ assemble_variable has a chance to act on it. This
+ would remove all traces of the register name in a
+ global register variable, for example. */
+ && !DECL_RTL_SET_P (decl))
cgraph_varpool_finalize_decl (decl);
else
assemble_variable (decl, top_level, at_end, 0);
OpenPOWER on IntegriCloud