This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE on bootstrap of libstdc++ for mingw-targets in add_bb_to_loop
Hi,
issue was caused by the patch for PR middle-end/52772, which just
handles dw2. This patch makes sure that for sjlj we add new generated
bb's for dispatching table to loop, too.
ChangeLog
2012-04-10 Kai Tietz <ktietz@redhat.com>
PR c++/52924
* except.c (sjlj_emit_dispatch_table): Add bb to loop,
as done for dwarf2.
Bootstrapped for x64_64-w64-mingw32, and x86_64-unknown-linux-gnu.
Later for all languages including Ada and Obj-C++.
Ok for apply?
Regards,
Kai
Index: except.c
===================================================================
--- except.c (revision 186288)
+++ except.c (working copy)
@@ -1344,6 +1344,16 @@
e = make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
e->count = bb->count;
e->probability = REG_BR_PROB_BASE;
+ if (current_loops)
+ {
+ struct loop *loop = bb->next_bb->loop_father;
+ /* If we created a pre-header block, add the new block to the
+ outer loop, otherwise to the loop itself. */
+ if (bb->next_bb == loop->header)
+ add_bb_to_loop (bb, loop_outer (loop));
+ else
+ add_bb_to_loop (bb, loop);
+ }
disp_index++;
}
@@ -1365,6 +1375,17 @@
e->count = bb->count;
e->probability = REG_BR_PROB_BASE;
}
+
+ if (current_loops)
+ {
+ struct loop *loop = bb->next_bb->loop_father;
+ /* If we created a pre-header block, add the new block to the
+ outer loop, otherwise to the loop itself. */
+ if (bb->next_bb == loop->header)
+ add_bb_to_loop (bb, loop_outer (loop));
+ else
+ add_bb_to_loop (bb, loop);
+ }
}
static void