aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/except.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@cygnus.com>1999-06-21 09:18:50 +0000
committerAndrew Haley <aph@gcc.gnu.org>1999-06-21 09:18:50 +0000
commit44d7502b7841307dda7b87b0fdb7c0761a74eba2 (patch)
tree8136a21782174edaf0486712f17e806c1fad5567 /gcc/java/except.c
parent60d0536b1edb935829a92be6526393e7c3a31896 (diff)
downloadgcc-44d7502b7841307dda7b87b0fdb7c0761a74eba2.zip
gcc-44d7502b7841307dda7b87b0fdb7c0761a74eba2.tar.gz
gcc-44d7502b7841307dda7b87b0fdb7c0761a74eba2.tar.bz2
except.c (find_handler_in_range): The upper limit for exception ranges is exclusive, not inclusive...
1999-06-21 Andrew Haley <aph@cygnus.com> * except.c (find_handler_in_range): The upper limit for exception ranges is exclusive, not inclusive: (start <= pc < end). (link_handler): find child pointer which points to outer by searching sibling list: previous code incorrectly assumed that outer->outer->first_child must point to outer. * verify.c (verify_jvm_instructions): FIXME added to code for `athrow'. (verify_jvm_instructions): Do not assume that the last block processed in a subroutine is a block which ends with a `ret' instruction. With some control flows it is possible that the last block ends with an `athrow'. From-SVN: r27658
Diffstat (limited to 'gcc/java/except.c')
-rw-r--r--gcc/java/except.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/except.c b/gcc/java/except.c
index c8674f3..46d98df 100644
--- a/gcc/java/except.c
+++ b/gcc/java/except.c
@@ -72,7 +72,7 @@ find_handler_in_range (pc, range, child)
{
if (pc < child->start_pc)
break;
- if (pc <= child->end_pc)
+ if (pc < child->end_pc)
return find_handler_in_range (pc, child, child->first_child);
}
cache_range = range;
@@ -129,7 +129,12 @@ link_handler (range, outer)
range->outer = outer->outer;
range->next_sibling = NULL;
range->first_child = outer;
- outer->outer->first_child = range;
+ {
+ struct eh_range **pr = &(outer->outer->first_child);
+ while (*pr != outer)
+ pr = &(*pr)->next_sibling;
+ *pr = range;
+ }
outer->outer = range;
return;
}