https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
--- Comment #34 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Niall Douglas from comment #33) > Re: your original point, I cannot say anything about _Atomic. However, for > std::atomic<__int128>, as __int128 is not an integral type it seems That depends whether you use -std=c++NN or -std=gnu++NN > reasonable to me that its specialisation tell the compiler to not store it > in read only memory. Mark it with attribute section, give it a non-trivial > destructor, or whatever it needs. std::atomic<T> requires T to have a trivial destructor, so the destructor is always trivial. > Perhaps I ought to open a separate issue here, as my specific problem is > that std::atomic<__int128>::compare_exchange_weak() is not using cmpxchg16b? Isn't that covered by PR 94649? std::atomic just calls the relevant __atomic built-in for all operations. What the built-in does is not up to libstdc++.