Commit 1f3388fe by Richard Biener

re PR ipa/60518 (ICE: in verify_loop_structure, at cfgloop.c:1647)

2014-03-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/60518
	* cfghooks.c (split_block): Properly adjust all loops the
	block was a latch of.

	* g++.dg/pr60518.C: New testcase.

From-SVN: r208567
parent 3d354792
2014-03-13 Martin Jambor <mjambor@suse.cz> 2014-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/60518
* cfghooks.c (split_block): Properly adjust all loops the
block was a latch of.
2014-03-14 Martin Jambor <mjambor@suse.cz>
PR lto/60461 PR lto/60461
* ipa-prop.c (ipa_modify_call_arguments): Fix iteration condition * ipa-prop.c (ipa_modify_call_arguments): Fix iteration condition
......
...@@ -510,9 +510,13 @@ split_block (basic_block bb, void *i) ...@@ -510,9 +510,13 @@ split_block (basic_block bb, void *i)
if (current_loops != NULL) if (current_loops != NULL)
{ {
edge_iterator ei;
edge e;
add_bb_to_loop (new_bb, bb->loop_father); add_bb_to_loop (new_bb, bb->loop_father);
if (bb->loop_father->latch == bb) /* Identify all loops bb may have been the latch of and adjust them. */
bb->loop_father->latch = new_bb; FOR_EACH_EDGE (e, ei, new_bb->succs)
if (e->dest->loop_father->latch == bb)
e->dest->loop_father->latch = new_bb;
} }
res = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU); res = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
......
2014-03-13 Martin Jambor <mjambor@suse.cz> 2014-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/60518
* g++.dg/pr60518.C: New testcase.
2014-03-14 Martin Jambor <mjambor@suse.cz>
PR lto/60461 PR lto/60461
* gcc.dg/lto/pr60461_0.c: New test. * gcc.dg/lto/pr60461_0.c: New test.
......
// { dg-do compile }
// { dg-options "-Os -fprofile-use" }
int a;
int fn1 () { return a == ',' || a == ';'; }
void fn2 ()
{
do
while (fn1 ())
;
while (1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment