https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106435
--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- > there was a change made to support cross-TU static inits for TLS For what it's worth, putting everything in a single cpp file makes it work as expected.