flow.c (find_basic_blocks): Handle cfg issues for rethrows and nested exceptions...
authorJeffrey A Law <law@cygnus.com>
Fri, 28 Nov 1997 03:10:10 +0000 (03:10 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 28 Nov 1997 03:10:10 +0000 (20:10 -0700)
        * flow.c (find_basic_blocks): Handle cfg issues for rethrows and
        nested exceptions correctly.

From-SVN: r16812

gcc/ChangeLog
gcc/flow.c

index da98037569531f8a4a46c8139b3004cce6685124..3587eb5eb98b4f247fb1f3922aa239c0b1e8262d 100644 (file)
@@ -1,5 +1,8 @@
 Thu Nov 27 12:20:19 1997  Jeffrey A Law  (law@cygnus.com)
 
+       * flow.c (find_basic_blocks): Handle cfg issues for rethrows and
+       nested exceptions correctly.
+
        * unroll.c (find_splittable_givs): Don't split givs with a dest_reg
        that was created by loop.
 
index ed66ce7c4ef5e5a56435be887d347bf862e34299..27409de005b8d3c8a1180b0d1040d3cc2c4d1a90 100644 (file)
@@ -472,10 +472,15 @@ find_basic_blocks (f, nonlocal_label_list)
       /* If we encounter a CALL_INSN, note which exception handler it
         might pass control to.
 
+        Because we do rethrows by loading the address of a label into
+        __eh_pc and throwing, we need to treat labels as potentially
+        jumping to exception handlers.
+
         If doing asynchronous exceptions, record the active EH handler
         for every insn, since most insns can throw.  */
       else if (eh_note
               && (asynchronous_exceptions
+                  || code == CODE_LABEL
                   || (GET_CODE (insn) == CALL_INSN
                       && ! find_reg_note (insn, REG_RETVAL, NULL_RTX))))
        active_eh_handler[INSN_UID (insn)] = XEXP (eh_note, 0);