This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix libjava compile failures


It still bears investigation why we wouldn't have also removed
the handlers associated with the removed exception region, but
this bit bears being a bit more robust.


r~

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

Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.174
diff -c -p -d -r1.174 except.c
*** except.c	2001/07/20 11:30:13	1.174
--- except.c	2001/07/25 19:58:44
*************** reachable_handlers (insn)
*** 2728,2741 ****
    region = cfun->eh->region_array[region_number];
  
    type_thrown = NULL_TREE;
!   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)
--- 2728,2747 ----
    region = cfun->eh->region_array[region_number];
  
    type_thrown = NULL_TREE;
!   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;
      }
  
    for (; region; region = region->outer)
      if (reachable_next_level (region, type_thrown, &info) >= RNL_CAUGHT)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]