[Bug libstdc++/114865] [13/14/15 Regression] std::atomic<X>::compare_exchange_strong seems to hang under GCC 13 for C++11
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 13 21:18:51 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114865
--- Comment #36 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:838972b05f90ae0704ecb134dcfe3682eccc61f5
commit r13-10128-g838972b05f90ae0704ecb134dcfe3682eccc61f5
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Feb 11 21:35:21 2026 -0500
libstdc++: Clear padding bits in std::atomic ctor in C++11 [PR114865]
After the front end change r16-7199 both GCC and Clang allow non-empty
constexpr constructor bodies in C++11 as an extension, so we can now
unconditionally enable the __builtin_clear_padding logic in std::atomic's
constructor.
PR libstdc++/114865
libstdc++-v3/ChangeLog:
* include/std/atomic (atomic<_Tp>::atomic(_Tp)) [C++11]:
Enable __builtin_clear_padding logic.
* testsuite/29_atomics/atomic/compare_exchange_padding.cc: Enable
this test in earlier modes, including C++11.
* testsuite/29_atomics/atomic/cons/zero_padding.cc [C++11]:
Enable tests verifying cleared padding bits for a non-static-init
std::atomic object.
Reviewed-by: Tomasz KamiÅski <tkaminsk@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit 48f2e8aa6ddad72955781728bdf515eb50411d24)
More information about the Gcc-bugs
mailing list