https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #4) > Thanks, Martin. So maybe something like this: > > --- a/libstdc++-v3/include/std/mutex > +++ b/libstdc++-v3/include/std/mutex > @@ -726,7 +738,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > __set_once_functor_lock_ptr(&__functor_lock); > #endif > > +#ifdef __powerpc__ > + int __e; > + __try { > + __e = __gthread_once(&__once._M_once, &__once_proxy); > + } __catch(...) { > + __once._M_once = once_flag{}._M_once; N.B. This won't work because it races, and may not even compile (if e.g. pthread_once_t has a const member)