diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-11-12 16:37:52 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-11-12 16:37:52 +0000 |
commit | 0a2695dba70df002f4ed8c0bad2a7c3403dd43df (patch) | |
tree | 517e3e9fda4562c722cfb2ed96466fb15762390e /gcc/passes.c | |
parent | 896b242cc52cc8bdeca781ba5b783b701e090020 (diff) | |
download | gcc-0a2695dba70df002f4ed8c0bad2a7c3403dd43df.zip gcc-0a2695dba70df002f4ed8c0bad2a7c3403dd43df.tar.gz gcc-0a2695dba70df002f4ed8c0bad2a7c3403dd43df.tar.bz2 |
re PR c++/18416 (ICE in import_export_decl)
PR c++/18416
* passes.c (rest_of_decl_compilation): Do not look at DECL_RTL
when deciding whether to pass a variable to
cgraph_varpool_finalize_decl or assemble_variable.
* toplev.c (check_global_declarations): Do not clear DECL_RTL.
PR c++/18416
* g++.dg/init/global1.C: New test.
From-SVN: r90532
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 9a486b7..e634372 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -229,14 +229,7 @@ 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 - /* 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)) + && TREE_CODE (decl) != FUNCTION_DECL && top_level) cgraph_varpool_finalize_decl (decl); else assemble_variable (decl, top_level, at_end, 0); |