https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123676
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <[email protected]>: https://gcc.gnu.org/g:22f51c0f5e62a4e05bccbd0dfb23762ef2eeeff8 commit r16-7056-g22f51c0f5e62a4e05bccbd0dfb23762ef2eeeff8 Author: Patrick Palka <[email protected]> Date: Mon Jan 26 22:00:16 2026 -0500 c++: non-dep decltype folding of concept-id C<Ts...> [PR123676] Here since the expression within the decltype C<Ts...> is not instantiation dependent (we know its type is bool, and don't care about its value) finish_decltype_type instantiates it immediately via the usual tsubst_expr with NULL_TREE args. During which however tsubst_pack_expansion isn't prepared to handle such a substitution due to an overly strict assert. This patch relaxes the assert accordingly. PR c++/123676 gcc/cp/ChangeLog: * pt.cc (tsubst_pack_expansion): Relax unsubsituted_packs assert to allow !processing_template_decl when args is NULL_TREE. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-decltype5.C: New test. Reviewed-by: Jason Merrill <[email protected]>
