https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102547
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:d4c470c376b4cb82c9a0b7e8a4b88c44d5e4289d commit r12-4196-gd4c470c376b4cb82c9a0b7e8a4b88c44d5e4289d Author: Patrick Palka <ppa...@redhat.com> Date: Tue Oct 5 15:35:21 2021 -0400 c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547] Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK<V0, V1>, and crash shortly thereafter because uses_template_parms(parms) calls potential_const_expr which doesn't handle NONTYPE_ARGUMENT_PACK. This patch fixes this by extending potential_constant_expression to handle NONTYPE_ARGUMENT_PACK appropriately. PR c++/102547 gcc/cp/ChangeLog: * constexpr.c (potential_constant_expression_1): Handle NONTYPE_ARGUMENT_PACK. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/variadic-partial2.C: New test. * g++.dg/cpp0x/variadic-partial2a.C: New test.