https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104236
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >or perhaps %= needs to be expanded sooner? The basic blocks are exactly the same. The %= is only there to resolve the issue where GCC duplicates the inline-asm and needs to be resolved at the end of compiling when outputting the asm itself. I don't see why even in this case would cause a problem as you have an inline-asm which is the same as the other and they are combined together. I think the original code should have had the two inline-asm combined together instead of having them seperated. That is: __asm__ __volatile__(".byte 0x0f, 0x0b\n" ".Lreachable%=: .pushsection .discard.reachable .long .Lreachable%= - . .popsection " : : : "memory"); .... __asm__ __volatile__(".byte 0x0f, 0x0b\n" ".Lreachable%=: .pushsection .discard.reachable .long .Lreachable%= - . .popsection " : "i"(0) : "memory"); That will fix the issue at hand in the code itself really. Even if you used 1: and 1b inside the inline-asm you would run into the same issue.