cfglayout.c (fixup_reorder_chain): Handle case where the destination of E_FALL is...
authorJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 16 Jun 2004 16:49:22 +0000 (17:49 +0100)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 16 Jun 2004 16:49:22 +0000 (17:49 +0100)
* cfglayout.c (fixup_reorder_chain): Handle case where the
destination of E_FALL is EXIT_BLOCK_PTR.

From-SVN: r83247

gcc/cfglayout.c

index ca3913f5fdf3d5d35b58140224af1e89d1db0667..0c13c56385004023cbc9f90eefb8a8b9f713f8e5 100644 (file)
@@ -712,13 +712,15 @@ fixup_reorder_chain (void)
                  if (note
                      && INTVAL (XEXP (note, 0)) < REG_BR_PROB_BASE / 2
                      && invert_jump (bb_end_insn,
-                                     label_for_bb (e_fall->dest), 0))
+                                     (e_fall->dest == EXIT_BLOCK_PTR
+                                      ? NULL_RTX
+                                      : label_for_bb (e_fall->dest)), 0))
                    {
+                     e_fall->flags &= ~EDGE_FALLTHRU;
 #ifdef ENABLE_CHECKING
                      if (!could_fall_through (e_taken->src, e_taken->dest))
                        abort ();
 #endif
-                     e_fall->flags &= ~EDGE_FALLTHRU;
                      e_taken->flags |= EDGE_FALLTHRU;
                      update_br_prob_note (bb);
                      e = e_fall, e_fall = e_taken, e_taken = e;