This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/64246] [5 Regression] ICE building libada for Windows due to NULL loop header
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Dec 2014 08:40:43 +0000
- Subject: [Bug middle-end/64246] [5 Regression] ICE building libada for Windows due to NULL loop header
- Auto-submitted: auto-generated
- References: <bug-64246-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64246
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
We should make mark_loop_for_removal more robust then, I am testing
Index: gcc/cfgloop.c
===================================================================
--- gcc/cfgloop.c (revision 218733)
+++ gcc/cfgloop.c (working copy)
@@ -1928,9 +1928,10 @@ bb_loop_depth (const_basic_block bb)
void
mark_loop_for_removal (loop_p loop)
{
+ if (loop->header == NULL)
+ return;
loop->former_header = loop->header;
loop->header = NULL;
loop->latch = NULL;
loops_state_set (LOOPS_NEED_FIXUP);
}
I suppose extracting a testcase for this is too hard?