http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44982
Steven Bosscher <steven at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2010-12-17 21:26:45 UTC --- I see no reason to cgraph_finalize_compilation_unit if there were parse errors. Richi, what do you think? Index: toplev.c =================================================================== --- toplev.c (revision 167996) +++ toplev.c (working copy) @@ -582,7 +582,12 @@ what's left of the symbol table output. */ timevar_pop (TV_PARSE); - if (flag_syntax_only || flag_wpa) + /* If all we have to do is syntax checking, or if there were parse + errors, stop here. */ + if (flag_syntax_only || seen_error) + return; + + if (flag_wpa) return; ggc_protect_identifiers = false; @@ -590,9 +595,6 @@ /* This must also call cgraph_finalize_compilation_unit. */ lang_hooks.decls.final_write_globals (); - if (seen_error ()) - return; - varpool_assemble_pending_decls (); finish_aliases_2 ();