https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51513
--- Comment #8 from Peter Bergner <bergner at gcc dot gnu.org> --- (In reply to Steven Bosscher from comment #4) > This should be solved by allowing labels in trivially_empty_bb_p. I tried the following, but it doesn't fix the problem. --- cfgcleanup.c (revision 222550) +++ cfgcleanup.c (working copy) @@ -2647,7 +2647,8 @@ trivially_empty_bb_p (basic_block bb) { if (insn == BB_HEAD (bb)) return true; - if (!DEBUG_INSN_P (insn)) + if (!(DEBUG_INSN_P (insn) + || (LABEL_P (insn) && !LABEL_PRESERVE_P (insn)))) return false; insn = PREV_INSN (insn); }