except.c (reachable_handlers): Handle a region being removed out from under a RESX.

* except.c (reachable_handlers): Handle a region being removed
        out from under a RESX.

From-SVN: r44363
This commit is contained in:
Richard Henderson 2001-07-25 12:59:39 -07:00 committed by Richard Henderson
parent 2c938d4292
commit 7f206d8f42
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-07-25 Richard Henderson <rth@redhat.com>
* except.c (reachable_handlers): Handle a region being removed
out from under a RESX.
2001-07-25 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_emit_conditional_move): Always

View File

@ -2728,14 +2728,20 @@ reachable_handlers (insn)
region = cfun->eh->region_array[region_number];
type_thrown = NULL_TREE;
if (region->type == ERT_THROW)
if (GET_CODE (insn) == JUMP_INSN
&& GET_CODE (PATTERN (insn)) == RESX)
{
/* A RESX leaves a region instead of entering it. Thus the
region itself may have been deleted out from under us. */
if (region == NULL)
return NULL;
region = region->outer;
}
else if (region->type == ERT_THROW)
{
type_thrown = region->u.throw.type;
region = region->outer;
}
else if (GET_CODE (insn) == JUMP_INSN
&& GET_CODE (PATTERN (insn)) == RESX)
region = region->outer;
for (; region; region = region->outer)
if (reachable_next_level (region, type_thrown, &info) >= RNL_CAUGHT)