+2008-12-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/38676
+ * gimplify.c (gimple_regimplify_operands): For GIMPLE_SWITCH
+ only regimplify switch index.
+
2008-12-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38645
gimplify_expr (gimple_cond_rhs_ptr (stmt), &pre, NULL,
is_gimple_val, fb_rvalue);
break;
+ case GIMPLE_SWITCH:
+ gimplify_expr (gimple_switch_index_ptr (stmt), &pre, NULL,
+ is_gimple_val, fb_rvalue);
+ break;
case GIMPLE_OMP_ATOMIC_LOAD:
gimplify_expr (gimple_omp_atomic_load_rhs_ptr (stmt), &pre, NULL,
is_gimple_val, fb_rvalue);
+2008-12-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/38676
+ * gcc.dg/gomp/pr38676.c: New test.
+
2008-12-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38645
--- /dev/null
+/* PR middle-end/38676 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+int
+main ()
+{
+ int bar, foo = 1;
+#pragma omp parallel for shared(foo)
+ for (bar = 0; bar < 3; bar++)
+ {
+ switch (foo)
+ {
+ case 1:
+ break;
+ }
+ }
+ return 0;
+}