https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120268
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is only valid with -fallow-store-data-races. Otherwise you can introduce a race condition according to the C/C++11 memory model.