------- Comment #1 from pinskia at gcc dot gnu dot org 2009-05-08 22:52 ------- This is by design, first inline-asm is not allowed to change control flow. Second labels can be moved if they are not used normally in the program. In this case they are not used normally. Addresses of labels are only designed for computed gotos and any other use causes undefined behavior of their placement.
Yes: asm("jmp %0" : : "i"(&&some_label)); is valid as the address of a label is a constant but GCC does not look into the string and how you use it. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40078