http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I see multiple issues: 1) commit_one_edge_insertion doesn't seem to cope with asm goto, I think asm goto with only labels pointing to the fallthru bb's labels can happen both for the single_pred_p (e->dest) case, as well as the single_succ_p case. JUMP_P in that case would be true, but we certainly can't insert in that case before the jump (aka asm goto). 2) during expansion, we apparently emit some further insns (some noop pseudo copy and unconditional jump) directly after asm goto into the same bb, then commit these edge insertions (so commit_one_edge_insertion actually doesn't see the asm goto at the end of the bb, but an unconditional jump) and only later on split the bb in find_many_sub_basic_blocks.