https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:82cd63a63eaa61a4ed5c4029a1869be7446ecb3c commit r15-2798-g82cd63a63eaa61a4ed5c4029a1869be7446ecb3c Author: Jakub Jelinek <ja...@redhat.com> Date: Wed Aug 7 19:08:07 2024 +0200 c++: Implement CWG2387 - Linkage of const-qualified variable template [PR109126] The following patch attempts to implement DR2387 by making variable templates including their specialization TREE_PUBLIC when at file scope and they don't have static storage class. 2024-08-07 Jakub Jelinek <ja...@redhat.com> PR c++/109126 * decl.cc (grokvardecl): Implement CWG 2387 - Linkage of const-qualified variable template. Set TREE_PUBLIC on variable templates with const qualified types unless static is present. * g++.dg/DRs/dr2387.C: New test. * g++.dg/DRs/dr2387-aux.cc: New file.