aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr41906.C12
-rw-r--r--gcc/tree-eh.c2
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5117af8..27b64e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e1c93e0..39c89bc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr41906.C b/gcc/testsuite/g++.dg/tree-ssa/pr41906.C
new file mode 100644
index 0000000..321d33a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr41906.C
@@ -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 ();}
+}
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index dde343c..1a9e7b5 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -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);