https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95750
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> --- Actually, x86_64 (at least my Fedora 32) does not like operations on stack: Starting program: /sdd/uros/git/gcc/gcc/testsuite/gcc.dg/atomic/a.out Program received signal SIGSEGV, Segmentation fault. 0x000000000040110a in main () (gdb) disass Dump of assembler code for function main: 0x0000000000401106 <+0>: push %rbp 0x0000000000401107 <+1>: mov %rsp,%rbp => 0x000000000040110a <+4>: lock orq $0x0,(%esp) 0x0000000000401111 <+11>: mov $0x0,%eax 0x0000000000401116 <+16>: pop %rbp 0x0000000000401117 <+17>: retq End of assembler dump. I didn't investigate further, but 32bit executable works OK.