https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103966
--- Comment #1 from Witold Baryluk <witold.baryluk+gcc at gmail dot com> --- Current codegen on gcc 12 on 64-bit x86: inc_a(): inc QWORD PTR x[rip] ret inc_b_non_atomic(): mov rax, QWORD PTR y[rip] inc rax mov QWORD PTR y[rip], rax ret y: .zero 8 x: .zero 8