https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66808

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 37095
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37095&action=edit
gcc6-pr66808.patch

Untested fix.  My understanding is that the tsubst_decl code just in some cases
does not expect a local VAR_DECL template to have DECL_LANG_SPECIFIC set and
doesn't clear some fields in it.  For the __thread var DECL_LANG_SPECIFIC it is
created to hold the GNU TLS bit.

Reply via email to