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/64246] [5 Regression] ICE building libada for Windows due to NULL loop header


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?


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