c++: variable tmpl partial specialization [PR108468]
commit9e44a9932c11f028269f3aa7e3031e703d151b0b
authorJason Merrill <jason@redhat.com>
Tue, 14 Mar 2023 20:32:31 +0000 (14 16:32 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 14 Mar 2023 22:09:52 +0000 (14 18:09 -0400)
treea2010eae9ce1eb120ff3a0c8f46503fa951e0eb4
parent2b204accd07a3185b58b1edc6e9b019472857a5d
c++: variable tmpl partial specialization [PR108468]

Generally we expect TPARMS_PRIMARY_TEMPLATE to be set, but sometimes it
isn't for partial instantiations.  This ought to be improved, but it's
trivial to work around it in this case.

PR c++/108468

gcc/cp/ChangeLog:

* pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
is non-null.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1y/var-templ78.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1y/var-templ78.C [new file with mode: 0644]