https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107675

--- Comment #15 from Thomas Neumann <tneumann at users dot sourceforge.net> ---
> You cannot use 'relaxed' atomic load in is_object_initialized - as thread
> performing such load will not observe/synchronize with any modifications
> (other than atomic variable itself) performed by other threads.

you are right, this has to be acquire. Very unfortunate. I thought we would get
away with relaxed because we double-check anyway, but with relaxed we might
miss the writes to the other fields of object.

On systems with strong memory order it does not matter, but on ARM this will
make the check slower.

Reply via email to