https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107393
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://gcc.gnu.org/g:a0344144dbccccf039f431a368f486f9dc6813ab commit r16-3637-ga0344144dbccccf039f431a368f486f9dc6813ab Author: H.J. Lu <[email protected]> Date: Thu Jul 31 07:38:48 2025 -0700 c++: Update TLS model after processing a TLS variable Set a tentative TLS model in grokvardecl and update TLS mode with the default TLS access model after a TLS variable has been fully processed if the default TLS access model is stronger. gcc/cp/ PR c++/107393 * decl.cc (grokvardecl): Set a tentative TLS model which will be updated by cplus_decl_attributes later. * decl2.cc (cplus_decl_attributes): Update TLS model with the default TLS access model if the default TLS access model is stronger. * pt.cc (tsubst_decl): Set TLS model only after processing a variable. gcc/testsuite/ PR c++/107393 * g++.dg/tls/pr107393-1.C: New test. * g++.dg/tls/pr107393-2.C: Likewise. Signed-off-by: H.J. Lu <[email protected]>
