re PR tree-optimization/52912 (ICE: verify_ssa failed)

2012-04-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/52912
	* tree-ssa-threadupdate.c (thread_block): Tell the cfg
	manipulation code we are threading through a loop header
	to an exit destination.

	* gcc.dg/torture/pr52912.c: New testcase.

From-SVN: r186303
This commit is contained in:
Richard Guenther 2012-04-11 08:12:33 +00:00 committed by Richard Biener
parent f06fe36d99
commit 12df9a2f92
4 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2012-04-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52912
* tree-ssa-threadupdate.c (thread_block): Tell the cfg
manipulation code we are threading through a loop header
to an exit destination.
2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree.h (warn_if_unused_value): Move declaration from here.

View File

@ -1,3 +1,8 @@
2012-04-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52912
* gcc.dg/torture/pr52912.c: New testcase.
2010-04-10 Michael Matz <matz@suse.de>
* gcc.dg/vect/vect-outer-1-big-array.c: Adjust.

View File

@ -0,0 +1,17 @@
/* { dg-do compile } */
int a, b, c;
static int
fn1 (p1)
{
lbl_549:
if (p1)
goto lbl_549;
return 0;
}
void
fn2 ()
{
b = (c && a) > fn1 (c) >= c;
}

View File

@ -661,6 +661,13 @@ thread_block (basic_block bb, bool noloop_only)
/* We do not update dominance info. */
free_dominance_info (CDI_DOMINATORS);
/* We know we only thread through the loop header to loop exits.
Let the basic block duplication hook know we are not creating
a multiple entry loop. */
if (noloop_only
&& bb == bb->loop_father->header)
set_loop_copy (bb->loop_father, loop_outer (bb->loop_father));
/* Now create duplicates of BB.
Note that for a block with a high outgoing degree we can waste
@ -692,6 +699,10 @@ thread_block (basic_block bb, bool noloop_only)
htab_delete (redirection_data);
redirection_data = NULL;
if (noloop_only
&& bb == bb->loop_father->header)
set_loop_copy (bb->loop_father, NULL);
/* Indicate to our caller whether or not any jumps were threaded. */
return local_info.jumps_threaded;
}