diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-03 23:04:23 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-03 23:04:23 +0000 |
commit | 81cd605e2bcf6402c0719656e5ff46ea50507455 (patch) | |
tree | 416df826773b53b3601236b5e995a747b7e4a23f /gcc/toplev.c | |
parent | 3846bf0cad1b5566578bb5904a027a82b71b3a3a (diff) | |
download | gcc-81cd605e2bcf6402c0719656e5ff46ea50507455.tar.gz |
PR optimization/12324
* toplev.c (rest_of_decl_compilation): Do not deffer when compiling
in unit-at-a-time mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74252 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index e4139611c5c..47cdc73c792 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1920,8 +1920,15 @@ rest_of_decl_compilation (tree decl, make_decl_rtl (decl, asmspec); /* Don't output anything when a tentative file-scope definition - is seen. But at end of compilation, do output code for them. */ - if ((at_end || !DECL_DEFER_OUTPUT (decl)) && !DECL_EXTERNAL (decl)) + is seen. But at end of compilation, do output code for them. + + We do output all variables when unit-at-a-time is active and rely on + callgraph code to defer them except for forward declarations + (see gcc.c-torture/compile/920624-1.c) */ + if ((at_end + || !DECL_DEFER_OUTPUT (decl) + || (flag_unit_at_a_time && DECL_INITIAL (decl))) + && !DECL_EXTERNAL (decl)) { if (flag_unit_at_a_time && !cgraph_global_info_ready && TREE_CODE (decl) != FUNCTION_DECL && top_level) |