https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66923
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Thu Aug 6 04:10:01 2015 New Revision: 226657 URL: https://gcc.gnu.org/viewcvs?rev=226657&root=gcc&view=rev Log: PR c++/66260 PR c++/66596 PR c++/66649 PR c++/66923 * pt.c (lookup_template_variable): Use NULL_TREE for type. (instantiate_template_1): Also set DECL_TI_ARGS based on the immediate parent. (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates. (finish_template_variable): Add complain parm. * cp-tree.h: Adjust. Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ32.C branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ35.C branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ36.C branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ38.C branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ39.C Modified: branches/gcc-5-branch/gcc/cp/ChangeLog branches/gcc-5-branch/gcc/cp/cp-tree.h branches/gcc-5-branch/gcc/cp/pt.c