https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51840
--- Comment #9 from Richard Henderson <rth at gcc dot gnu.org> --- Created attachment 33105 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33105&action=edit corrected test case I believe that the original test case is in fact invalid. Every asm goto has N labels attached, and the optimizers are properly adjusting them when we make changes to the CFG. The fact that the test doesn't make use of the changed labels is what makes it invalid. If we fix the test case like so, it does work properly.