https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109164
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2023-03-16 Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The bug has been in around since thread_local was added it seems back in GCC 4.8.0. Confirmed. Note the wrong code can be reproduced on x86 too.