re PR middle-end/45854 (ICE in redirect_eh_edge_1, at tree-eh.c:2131)

2010-10-01  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45854
	* tree-eh.c (cleanup_empty_eh): Avoid degenerate case.

	* g++.dg/torture/pr45854.C: New testcase.

From-SVN: r164881
This commit is contained in:
Richard Guenther 2010-10-01 12:07:47 +00:00 committed by Richard Biener
parent 33f4936701
commit 0d228a5255
4 changed files with 47 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-10-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45854
* tree-eh.c (cleanup_empty_eh): Avoid degenerate case.
2010-10-01 Anthony Green <green@moxielogic.com>
* config.gcc: Fix moxie-*-rtems* configuration.

View File

@ -1,3 +1,8 @@
2010-10-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45854
* g++.dg/torture/pr45854.C: New testcase.
2010-09-30 Michael Eager <eager@eagercon.com>
* gcc.c-torture/execute/cmpsf-1.c: Rename FLOAT_{MIN,MAX} to

View File

@ -0,0 +1,30 @@
// { dg-do compile }
template < typename = void >
struct X { } ;
struct Y
{
Y () ;
} ;
template < typename = X < > >
struct T
{
void f ()
{
f () ;
}
} ;
struct S
{
S ( X < > = X < > ()) ;
~S ()
{
T < > () . f () ;
}
} ;
struct Z
{
S s ;
Y y ;
} a ;

View File

@ -3743,7 +3743,13 @@ cleanup_empty_eh (eh_landing_pad lp)
/* If the block is totally empty, look for more unsplitting cases. */
if (gsi_end_p (gsi))
return cleanup_empty_eh_unsplit (bb, e_out, lp);
{
/* For the degenerate case of an infinite loop bail out. */
if (e_out->dest == bb)
return false;
return cleanup_empty_eh_unsplit (bb, e_out, lp);
}
/* The block should consist only of a single RESX statement. */
resx = gsi_stmt (gsi);