https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95652
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Teo Samarzija from comment #5) > (In reply to Uroš Bizjak from comment #4) > > (In reply to Teo Samarzija from comment #3) > > > Besides, how does CLANG compile that same code fine, also under Linux and > > > with "-masm=intel"? Maybe you can copy the way CLANG does that. > > > > Clang outputs: > > > > mov dword ptr [rip + eax], 1088421888 > > > > which gld does't understand: > > > > pr95652.s: Assembler messages: > > pr95652.s:17: Error: `dword ptr [rip+eax]' is not a valid base/index > > expression > > Which version of CLANG? CLANG 9.0 compiles the code in the opening post > correctly (under Linux and using Intel Syntax). Try to assemble the produced assembly with gas.