https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
--- Comment #13 from toby at winterflaw dot net --- On 29 Mar 2018, andysem at mail dot ru <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878 > >--- Comment #12 from andysem at mail dot ru --- >Is read-only memory a valid use case for __atomic intrinsics anyway? >These >intrinsics are primarily targeted to implement std::atomic, but does >the >standard guarantee these operations (primarily, std::atomic::load()) do >not >issue writes to the memory? On Intel, all CAS operations always write, even if thr compare failed.