2011-05-10 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/48611
+ PR tree-optimization/48794
+ * tree-eh.c (remove_unreachable_handlers): Don't remove regions
+ referenced from RESX or EH_DISPATCH arguments.
+
PR debug/48928
* dfp.c (decimal_to_decnumber): Handle conversion from
dconst{1,2,m1,half}.
2011-05-10 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/48611
+ PR tree-optimization/48794
+ * gfortran.dg/gomp/pr48611.f90: New test.
+ * gfortran.dg/gomp/pr48794.f90: New test.
+
PR debug/48928
* gcc.dg/dfp/pr48928.c: New test.
--- /dev/null
+! PR tree-optimization/48611
+! { dg-do compile }
+! { dg-options "-Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop" }
+
+ integer, allocatable :: a(:)
+ logical :: l
+!$omp parallel private (a) reduction (.or.:l)
+ do i = 1, 7
+ a(:) = i
+ end do
+!$omp end parallel
+end
--- /dev/null
+! PR tree-optimization/48794
+! { dg-do compile }
+! { dg-options "-Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop" }
+
+ integer, allocatable :: a(:)
+ logical :: l
+ if (allocated (a)) call abort
+!$omp parallel private (a) reduction (.or.:l)
+ do i = 1, 7
+ end do
+!$omp end parallel
+end
SET_BIT (r_reachable, region->index);
SET_BIT (lp_reachable, lp_nr);
}
+
+ /* Avoid removing regions referenced from RESX/EH_DISPATCH. */
+ switch (gimple_code (stmt))
+ {
+ case GIMPLE_RESX:
+ SET_BIT (r_reachable, gimple_resx_region (stmt));
+ break;
+ case GIMPLE_EH_DISPATCH:
+ SET_BIT (r_reachable, gimple_eh_dispatch_region (stmt));
+ break;
+ default:
+ break;
+ }
}
}