diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f26a7a0e40..1031a436aa8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-04 Alexandre Oliva + + * cfgexpand.c (expand_gimple_basic_block): Disregard debug + insns after final jump in test to emit dummy move. + 2017-01-04 Alexandre Oliva * gimple-iterator.h (gsi_one_nondebug_before_end_p): New. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index ae063c1764f..66af69973c6 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -5767,7 +5767,9 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) if (single_succ_p (bb) && (single_succ_edge (bb)->flags & EDGE_FALLTHRU) && (last = get_last_insn ()) - && JUMP_P (last)) + && (JUMP_P (last) + || (DEBUG_INSN_P (last) + && JUMP_P (prev_nondebug_insn (last))))) { rtx dummy = gen_reg_rtx (SImode); emit_insn_after_noloc (gen_move_insn (dummy, dummy), last, NULL);