This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25776] [4.2 Regression] ICE in cgraph after error at -O1 and above
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2006 00:38:21 -0000
- Subject: [Bug middle-end/25776] [4.2 Regression] ICE in cgraph after error at -O1 and above
- References: <bug-25776-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-04-24 00:38 -------
here is the fix I came up with:
Index: cgraphunit.c
===================================================================
--- cgraphunit.c (revision 113199)
+++ cgraphunit.c (working copy)
@@ -1404,7 +1404,8 @@ cgraph_optimize (void)
fprintf (cgraph_dump_file, "Marked ");
dump_cgraph (cgraph_dump_file);
}
- ipa_passes ();
+ if (errorcount == 0 && sorrycount == 0)
+ ipa_passes ();
/* This pass remove bodies of extern inline functions we never inlined.
Do this later so other IPA passes see what is really going on. */
cgraph_remove_unreachable_nodes (false, dump_file);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25776