https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111589
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The interesting question is whether all of these can be relaxed or if we need
to stop using __atomic_add_dispatch for shared_ptr copies:
include/bits/cow_string.h:
__gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
include/bits/cow_string.h:
__gnu_cxx::__atomic_add_dispatch(&_M_rep()->_M_refcount, 1);
include/bits/ios_base.h: _M_add_reference() {
__gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
include/bits/locale_classes.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
include/bits/locale_classes.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
include/bits/shared_ptr_base.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
include/bits/shared_ptr_base.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
include/ext/atomicity.h: // __atomic_add_dispatch
include/ext/atomicity.h: __atomic_add_dispatch(_Atomic_word* __mem, int __val)
include/ext/pool_allocator.h: __atomic_add_dispatch(&_S_force_new,
1);
include/ext/pool_allocator.h: __atomic_add_dispatch(&_S_force_new,
-1);
include/ext/rc_string_base.h: __atomic_add_dispatch(&_M_info._M_refcount,
1);
include/tr1/shared_ptr.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
include/tr1/shared_ptr.h: {
__gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
libsupc++/eh_atomics.h: __gnu_cxx::__atomic_add_dispatch (__count, 1);
src/c++98/ios_init.cc: __gnu_cxx::__atomic_add_dispatch(&_S_refcount, 1);