aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-05-30 15:46:25 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-05-30 15:46:25 +0200
commit722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37 (patch)
treebdd58629392eea9ed231c4409541624029fefcce /gcc/except.c
parent9cc1244e762b1cab9245e54a3061e12950c3b8f1 (diff)
downloadgcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.zip
gcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.tar.gz
gcc-722ba5eeacaeaf2c913d74f5d17b5e8ab9f04d37.tar.bz2
re PR tree-optimization/31769 (ICE with OpenMP and exceptions)
PR tree-optimization/31769 * except.c (duplicate_eh_regions): Clear prev_try if ERT_MUST_NOT_THROW region is inside of ERT_TRY region. * g++.dg/gomp/pr31769.C: New test. From-SVN: r125183
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 29a28d7..b360ae4 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1005,7 +1005,11 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
prev_try && prev_try->type != ERT_TRY;
prev_try = prev_try->outer)
- ;
+ if (prev_try->type == ERT_MUST_NOT_THROW)
+ {
+ prev_try = NULL;
+ break;
+ }
/* Remap all of the internal catch and cleanup linkages. Since we
duplicate entire subtrees, all of the referenced regions will have