https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118733
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is a race condition of having it existed and not existing from a different thread. So yes this is undefined behavior.