https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119345
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:5957b9919c9ecda6e4ca198086f8bb9ea215232c commit r15-9369-g5957b9919c9ecda6e4ca198086f8bb9ea215232c Author: Jason Merrill <ja...@redhat.com> Date: Thu Apr 10 14:34:35 2025 -0400 c++: nested lambda capture pack [PR119345] tsubst_stmt already registers a local capture proxy as a local_specialization of both an outer capture proxy and the captured variable; we also need to do that in add_extra_args. PR c++/119345 gcc/cp/ChangeLog: * pt.cc (add_extra_args): Also register a specialization of the captured variable. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-targ14.C: New test.