re PR c++/41906 (ICE with catch(...) and -fpermissive)

PR c++/41906
        * tree-eh.c (lower_catch): Stop after expanding a catch-all.

testsuite/
        * g++.dg/tree-ssa/pr41906.C: New testcase.

From-SVN: r154704
This commit is contained in:
Michael Matz 2009-11-27 13:08:58 +00:00 committed by Michael Matz
parent b56ae8c7c7
commit d815d34e46
4 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-11-27 Michael Matz <matz@suse.de>
PR c++/41906
* tree-eh.c (lower_catch): Stop after expanding a catch-all.
2009-11-27 Richard Guenther <rguenther@suse.de>
* timevar.def (TV_LOOP_MOVE_INVARIANTS, TV_LOOP_UNSWITCH,

View File

@ -1,3 +1,8 @@
2009-11-27 Michael Matz <matz@suse.de>
PR c++/41906
* g++.dg/tree-ssa/pr41906.C: New testcase.
2009-11-27 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/O16384.c: New test.

View File

@ -0,0 +1,12 @@
/* { dg-do compile } */
/* { dg-options "-fpermissive -w" } */
/* We aren't interested in the warning, but in the ICE. */
void foo();
extern void abort (void);
void bar()
{
try { foo(); }
catch (...) {}
catch (int) {abort ();}
}

View File

@ -1666,6 +1666,8 @@ lower_catch (struct leh_state *state, gimple tp)
x = gimple_build_goto (out_label);
gimple_seq_add_stmt (&new_seq, x);
}
if (!c->type_list)
break;
}
gimple_try_set_cleanup (tp, new_seq);