https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122584
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tomasz Kaminski <[email protected]>: https://gcc.gnu.org/g:427911622fcae352f086dd543b21c16071f7e4ab commit r16-5215-g427911622fcae352f086dd543b21c16071f7e4ab Author: Tomasz KamiÅski <[email protected]> Date: Wed Nov 12 11:16:58 2025 +0100 libtdc++: Test atomic_ref<volatile T> only if operations are lock-free [PR122584] For non-templated tests, a volatile_<T> alias is used. This alias expands to volatile T if std::atomic_ref<T>::is_always_lock_free is true, and to T otherwise. For templated functions, testing is controlled using if constexpr. PR libstdc++/115402 PR libstdc++/122584 libstdc++-v3/ChangeLog: * testsuite/29_atomics/atomic_ref/address.cc: Guard test for volatile with if constexpr. * testsuite/29_atomics/atomic_ref/deduction.cc: Likewise. * testsuite/29_atomics/atomic_ref/op_support.cc: Likewise. * testsuite/29_atomics/atomic_ref/requirements.cc: Likewise. * testsuite/29_atomics/atomic_ref/bool.cc: Use volatile_t alias. * testsuite/29_atomics/atomic_ref/generic.cc: Likewise. * testsuite/29_atomics/atomic_ref/integral.cc: Likewise. * testsuite/29_atomics/atomic_ref/pointer.cc: Likewise. * testsuite/29_atomics/atomic_ref/float.cc: Likewise, and remove not discarding if constexpr. Reviewed-by: Jonathan Wakely <[email protected]> Signed-off-by: Tomasz KamiÅski <[email protected]>
