summaryrefslogtreecommitdiff
path: root/gcc/cfglayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r--gcc/cfglayout.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 76925a519f2..05aed221f0b 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -766,7 +766,7 @@ fixup_reorder_chain (void)
{
edge e_fall, e_taken, e;
rtx bb_end_insn;
- basic_block nb;
+ basic_block nb, src_bb;
edge_iterator ei;
if (EDGE_COUNT (bb->succs) == 0)
@@ -894,7 +894,10 @@ fixup_reorder_chain (void)
continue;
}
- /* We got here if we need to add a new jump insn. */
+ /* We got here if we need to add a new jump insn.
+ Note force_nonfallthru can delete E_FALL and thus we have to
+ save E_FALL->src prior to the call to force_nonfallthru. */
+ src_bb = e_fall->src;
nb = force_nonfallthru (e_fall);
if (nb)
{
@@ -905,9 +908,9 @@ fixup_reorder_chain (void)
bb = nb;
/* Make sure new bb is tagged for correct section (same as
- fall-thru source, since you cannot fall-throu across
+ fall-thru source, since you cannot fall-thru across
section boundaries). */
- BB_COPY_PARTITION (e_fall->src, single_pred (bb));
+ BB_COPY_PARTITION (src_bb, single_pred (bb));
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections
&& JUMP_P (BB_END (bb))