https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114865
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[13/14/15 Regression] |[13/14/15 Regression] |std::atomic<X>::compare_exc |std::atomic<X>::compare_exc |hange_strong seems to hang |hange_strong seems to hang |under GCC 13 on Ubuntu |under GCC 13 for C++11 |23.04 | --- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- #if __cplusplus >= 201402L && __has_builtin(__builtin_clear_padding) if _GLIBCXX17_CONSTEXPR (__atomic_impl::__maybe_has_padding<_Tp>()) __builtin_clear_padding(std::__addressof(_M_i)); #endif So yes it is definitely dependent on C++ level ... That is for C++14+ it is working correctly.