* except.c (emit_to_new_bb_before): Break fallthru edges.
authorJan Hubicka <jh@suse.cz>
Sun, 7 Mar 2004 22:29:28 +0000 (23:29 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 7 Mar 2004 22:29:28 +0000 (22:29 +0000)
From-SVN: r79071

gcc/ChangeLog
gcc/except.c

index dc730ed..8c89c33 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-07  Jan Hubicka  <jh@suse.cz>
+
+       * except.c (emit_to_new_bb_before):  Break fallthru edges.
+
 2004-03-07  Stephane Carrez  <stcarrez@nerim.fr>
 
        * config/m68hc11/m68hc11.md ("*lshrsi3_const"): Disable for 68HC12.
index d290a60..0084af1 100644 (file)
@@ -1637,7 +1637,14 @@ emit_to_new_bb_before (rtx seq, rtx insn)
 {
   rtx last;
   basic_block bb;
+  edge e;
 
+  /* If there happens to be an fallthru edge (possibly created by cleanup_cfg
+     call), we don't want it to go into newly created landing pad or other EH 
+     construct.  */
+  for (e = BLOCK_FOR_INSN (insn)->pred; e; e = e->pred_next)
+    if (e->flags & EDGE_FALLTHRU)
+      force_nonfallthru (e);
   last = emit_insn_before (seq, insn);
   if (GET_CODE (last) == BARRIER)
     last = PREV_INSN (last);