aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-05-10 08:08:18 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-05-10 08:08:18 +0200
commit6ae70ea2e6f12a97415896b4721bf4df536e3b09 (patch)
treeeeaa46393953dd5b9765c18fe9332858b16a475a /gcc/tree-eh.c
parente7f7802150169bf0ec2b8a3ad309c53f87280927 (diff)
downloadgcc-6ae70ea2e6f12a97415896b4721bf4df536e3b09.zip
gcc-6ae70ea2e6f12a97415896b4721bf4df536e3b09.tar.gz
gcc-6ae70ea2e6f12a97415896b4721bf4df536e3b09.tar.bz2
re PR tree-optimization/48611 (ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop on basic code)
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. * gfortran.dg/gomp/pr48611.f90: New test. * gfortran.dg/gomp/pr48794.f90: New test. From-SVN: r173607
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index cd6c428..e87c32e 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3316,6 +3316,19 @@ remove_unreachable_handlers (void)
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;
+ }
}
}