re PR middle-end/33589 (ICE on valid code at -O2: verify_flow_info failed)

2007-10-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/33589
        * tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
        the eh information on the statement.
2007-10-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/33589
        * g++.dg/torture/pr33589-1.C: New testcase.
        * g++.dg/torture/pr33589-2.C: New testcase.

From-SVN: r129700
This commit is contained in:
Andrew Pinski 2007-10-28 10:00:54 -07:00 committed by Andrew Pinski
parent eee717aa54
commit 6f17d116b7
5 changed files with 53 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
the eh information on the statement.
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-flow.h (subvar_t): Make it a VEC.

View File

@ -1,3 +1,9 @@
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* g++.dg/torture/pr33589-1.C: New testcase.
* g++.dg/torture/pr33589-2.C: New testcase.
2007-10-28 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/alias-15.c: Adjust pattern.

View File

@ -0,0 +1,22 @@
// { dg-do compile }
struct base { void somemethod() {} };
struct derived : public base { };
struct smartpointer
{
~smartpointer() { }
operator derived*() const
{
return 0;
}
};
typedef void ( derived::* methodptr_type )();
methodptr_type getmemberptr()
{
return &derived::somemethod;
}
void somefunction()
{
smartpointer pObj;
( pObj->*getmemberptr() )();
}

View File

@ -0,0 +1,13 @@
// { dg-do compile }
void f(void*) throw();
void somefunction()
{
try {
void (*g)(void*) = (void (*)(void*))f;
void (*g2)(int*) = (void (*)(int*))g;
g2(0);
} catch (...)
{throw;}
}

View File

@ -758,7 +758,12 @@ rewrite_trees (var_map map, tree *values)
if (remove)
bsi_remove (&si, true);
else
bsi_next (&si);
{
if (changed)
if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
tree_purge_dead_eh_edges (bb);
bsi_next (&si);
}
}
phi = phi_nodes (bb);