https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97936
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to H.J. Lu from comment #1) > Also: > > FAIL: 29_atomics/atomic_integral/wait_notify.cc This looks like a bug in the test: std::atomic<Tp> a(val1); std::thread t([&] { cv.notify_one(); a.wait(val1); if (a.load() != val2) a = val1; }); std::unique_lock<std::mutex> l(m); cv.wait(l); The new thread might run cv.notify_one() before cv.wait(l) so we get a missed notification and block forever.