This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/44982] [4.3/4.4/4.5/4.6 Regression] ICE in get_narrower, at tree.c:7832


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 ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]