[Bug c++/82663] optimizer duplicates assembly jump label (when -std=c++11 and -O3)
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Oct 22 23:05:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82663
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |segher at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
That's not valid code. See the last paragraph of
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Extended-Asm.html#Volatile :
Under certain circumstances, GCC may duplicate (or remove duplicates of)
your assembly code when optimizing. This can lead to unexpected duplicate
symbol errors during compilation if your asm code defines symbols or labels.
Using ‘%=’ (see AssemblerTemplate) may help resolve this problem.
More information about the Gcc-bugs
mailing list