summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-12 02:58:23 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-12 02:58:23 +0000
commitd33336ad056cc83d30a659662399ba08b53a9bf5 (patch)
tree4292226e086fb8d5382778d1c1ba94f359a5aa97 /gcc/except.c
parentc1ff992ea3514d1c1291de418c758b2cb361340d (diff)
downloadgcc-d33336ad056cc83d30a659662399ba08b53a9bf5.tar.gz
* except.c (sjlj_find_directly_reachable_regions): Don't
consider RNL_BLOCKED a directly reachable region. (sjlj_assign_call_site_values): Trust directly_reachable. (sjlj_emit_dispatch_table): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/except.c b/gcc/except.c
index cc7177d0a27..98e5e24f948 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2014,6 +2014,7 @@ sjlj_find_directly_reachable_regions (lp_info)
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
{
struct eh_region *region;
+ enum reachable_code rc;
tree type_thrown;
rtx note;
@@ -2035,11 +2036,14 @@ sjlj_find_directly_reachable_regions (lp_info)
/* Find the first containing region that might handle the exception.
That's the landing pad to which we will transfer control. */
+ rc = RNL_NOT_CAUGHT;
for (; region; region = region->outer)
- if (reachable_next_level (region, type_thrown, 0) != RNL_NOT_CAUGHT)
- break;
-
- if (region)
+ {
+ rc = reachable_next_level (region, type_thrown, 0);
+ if (rc != RNL_NOT_CAUGHT)
+ break;
+ }
+ if (rc == RNL_MAYBE_CAUGHT || rc == RNL_CAUGHT)
{
lp_info[region->region_number].directly_reachable = 1;
found_one = true;
@@ -2086,8 +2090,7 @@ sjlj_assign_call_site_values (dispatch_label, lp_info)
index = 0;
for (i = cfun->eh->last_region_number; i > 0; --i)
- if (lp_info[i].directly_reachable
- && lp_info[i].action_index >= 0)
+ if (lp_info[i].directly_reachable)
lp_info[i].dispatch_index = index++;
/* Finally: assign call-site values. If dwarf2 terms, this would be
@@ -2316,8 +2319,7 @@ sjlj_emit_dispatch_table (dispatch_label, lp_info)
first_reachable = 0;
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- if (! lp_info[i].directly_reachable
- || lp_info[i].action_index < 0)
+ if (! lp_info[i].directly_reachable)
continue;
if (! first_reachable)