diff options
author | Jan Hubicka <jh@suse.cz> | 2005-05-14 16:32:39 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2005-05-14 14:32:39 +0000 |
commit | a8b3ba8b0511bc75c67963d54f779bb65865d1be (patch) | |
tree | c4111ed07234054e52aad81d13b76812cc1e76f4 /gcc/tree-eh.c | |
parent | a78b491f29bb39a96308030e22cf035eb22b1ef4 (diff) | |
download | gcc-a8b3ba8b0511bc75c67963d54f779bb65865d1be.zip gcc-a8b3ba8b0511bc75c67963d54f779bb65865d1be.tar.gz gcc-a8b3ba8b0511bc75c67963d54f779bb65865d1be.tar.bz2 |
Patch by Richard Henderson:
* tree-eh.c (tree_can_throw_internal, tree_can_throw_external):
Handle RESX expressions properly.
From-SVN: r99698
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 3315ffe..7d83746 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2008,7 +2008,12 @@ tree_could_throw_p (tree t) bool tree_can_throw_internal (tree stmt) { - int region_nr = lookup_stmt_eh_region (stmt); + int region_nr; + + if (TREE_CODE (stmt) == RESX_EXPR) + region_nr = TREE_INT_CST_LOW (TREE_OPERAND (stmt, 0)); + else + region_nr = lookup_stmt_eh_region (stmt); if (region_nr < 0) return false; return can_throw_internal_1 (region_nr); @@ -2017,10 +2022,16 @@ tree_can_throw_internal (tree stmt) bool tree_can_throw_external (tree stmt) { - int region_nr = lookup_stmt_eh_region (stmt); + int region_nr; + + if (TREE_CODE (stmt) == RESX_EXPR) + region_nr = TREE_INT_CST_LOW (TREE_OPERAND (stmt, 0)); + else + region_nr = lookup_stmt_eh_region (stmt); if (region_nr < 0) - return false; - return can_throw_external_1 (region_nr); + return tree_could_throw_p (stmt); + else + return can_throw_external_1 (region_nr); } bool |