https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67533
tbsaunde at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tbsaunde at gcc dot gnu.org --- Comment #4 from tbsaunde at gcc dot gnu.org --- minimal test case: struct Tls {}; void _ZTW5mytls(); thread_local Tls mytls = mytls It seems like the problem is the c++ fe doesn't expect _ZTW5mytls to be prototyped by user code.