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
This commit is contained in:
Richard Biener 2014-03-14 12:54:25 +00:00
parent 3d354792e6
commit 1f3388fec4
4 changed files with 32 additions and 4 deletions

View File

@ -1,4 +1,10 @@
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
* ipa-prop.c (ipa_modify_call_arguments): Fix iteration condition

View File

@ -510,9 +510,13 @@ split_block (basic_block bb, void *i)
if (current_loops != NULL)
{
edge_iterator ei;
edge e;
add_bb_to_loop (new_bb, bb->loop_father);
if (bb->loop_father->latch == bb)
bb->loop_father->latch = new_bb;
/* Identify all loops bb may have been the latch of and adjust them. */
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);

View File

@ -1,4 +1,9 @@
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
* gcc.dg/lto/pr60461_0.c: New test.

View File

@ -0,0 +1,13 @@
// { dg-do compile }
// { dg-options "-Os -fprofile-use" }
int a;
int fn1 () { return a == ',' || a == ';'; }
void fn2 ()
{
do
while (fn1 ())
;
while (1);
}