https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65149
--- Comment #2 from Alexey Lapshin <alexey.lapshin at oracle dot com> --- The similar test case for C does not fail. gcc aligns this 8-bytes structure at 8-bytes so inlined lock-free code is working correctly. Another thing is that this bug exist on x86 also. lock free code on x86 could have data-races if unaligned object split across cache-lines.