https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761
--- Comment #11 from Thomas Rodgers <rodgertq at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #10) > http://eel.is/c++draft/atomics#ref.generic.general-3.sentence-2 > > "While any atomic_ref instances exist that reference the *ptr object, all > accesses to that object shall exclusively occur through those atomic_ref > instances." Yes. I will submit a patch for this test shortly. Having said that, the atomic integral tests also spuriously deadlock, they don't have this UB issue.