[Bug c++/123676] [13/14/15/16 Regression] ICE in tsubst_pack_expansion with lambda template parameter pack in trailing return type decltype of a concept since r12-7564
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 27 03:03:43 GMT 2026
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 <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:22f51c0f5e62a4e05bccbd0dfb23762ef2eeeff8
commit r16-7056-g22f51c0f5e62a4e05bccbd0dfb23762ef2eeeff8
Author: Patrick Palka <ppalka@redhat.com>
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 <jason@redhat.com>
More information about the Gcc-bugs
mailing list