https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107736
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=107738 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >So this is a limitation of gcc I guess? I suspect it just accidently works for clang/LLVM. The section at the time was a text section when clang emits the assembler (most likely it assumes it is the first thing in the file) You could define a global symbol there in the top-level inline-asm and think it should work as a read-write symbol but it does not; there is no way clang would know that was what you think it should do. Note I filed PR 107738 for some of the more common mistakes of top-level inline-asm