+2007-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/30558
+ * tree-eh.c (lower_eh_filter): If EH_FILTER_MUST_NOT_THROW
+ clear this_state.prev_try.
+
2007-04-26 Richard Sandiford <richard@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
+2007-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/30558
+ * g++.dg/gomp/pr30558.C: New test.
+
2007-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/31338
--- /dev/null
+// PR tree-optimization/30558
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+template <typename T> struct F
+{
+ ~F ();
+ F (T);
+ const T &operator[] (unsigned i) const;
+};
+
+template <typename T> F<T> foo (const F<T> &x)
+{
+ return F<T> (x[1]);
+}
+
+struct G
+{
+ G () { bar (2); }
+ F<int> &operator () (F<int> x);
+ void bar (int);
+};
+
+int
+main ()
+{
+ try
+ {
+ G g;
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ {
+ F<int> j (i);
+ F<int> f = g (j);
+ F<int> h = foo (f);
+ }
+ }
+ catch (int &e)
+ {
+ }
+}
EH_FILTER_TYPES (inner));
this_state = *state;
this_state.cur_region = this_region;
+ /* For must not throw regions any cleanup regions inside it
+ can't reach outer catch regions. */
+ if (EH_FILTER_MUST_NOT_THROW (inner))
+ this_state.prev_try = NULL;
lower_eh_constructs_1 (&this_state, &TREE_OPERAND (*tp, 0));