PR middle-end/33333
* gimplify.c (gimplify_omp_for): Gimplify OMP_FOR_PRE_BODY.
* g++.dg/gomp/pr33333.C: New test.
From-SVN: r131820
+2008-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/33333
+ * gimplify.c (gimplify_omp_for): Gimplify OMP_FOR_PRE_BODY.
+
2008-01-25 Golovanevsky Olga <olga@il.ibm.com>
* ipa-struct-reorg.c (remove_str_allocs_in_func, remove_str_allocs):
else
var = decl;
+ /* If OMP_FOR is re-gimplified, ensure all variables in pre-body
+ are noticed. */
+ gimplify_stmt (&OMP_FOR_PRE_BODY (for_stmt));
+
ret |= gimplify_expr (&GENERIC_TREE_OPERAND (t, 1),
&OMP_FOR_PRE_BODY (for_stmt),
NULL, is_gimple_val, fb_rvalue);
2008-01-25 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/33333
+ * g++.dg/gomp/pr33333.C: New test.
+
PR preprocessor/34692
* gcc.dg/cpp/pr34692.c: New test.
* gcc.dg/gomp/pr34692.c: New test.
--- /dev/null
+// PR middle-end/33333
+// { dg-do compile }
+
+struct A
+{
+ int n;
+ void foo ();
+};
+
+void
+A::foo ()
+{
+ try
+ {
+ #pragma omp parallel for
+ for (int i = 0; i < n; ++i)
+ ;
+ } catch (...) {}
+}