aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2001-12-11 18:58:23 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-12-11 18:58:23 -0800
commit98ce21b3b388f4f93b1926c1bac451ead787292a (patch)
tree4292226e086fb8d5382778d1c1ba94f359a5aa97 /gcc/except.c
parenteb15deddff31c90b3bdab910bfd9330565087042 (diff)
downloadgcc-98ce21b3b388f4f93b1926c1bac451ead787292a.zip
gcc-98ce21b3b388f4f93b1926c1bac451ead787292a.tar.gz
gcc-98ce21b3b388f4f93b1926c1bac451ead787292a.tar.bz2
except.c (sjlj_find_directly_reachable_regions): Don't consider RNL_BLOCKED a directly reachable region.
* 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. From-SVN: r47915
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 cc7177d..98e5e24 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)