https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103985
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There could be a lock missing when it comes to the write. I remember in the past there were some issues with writes not being thread safe (maybe they still are not).