https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101717
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:7ce3d2ab2a1a144f94a3a9be716fb831cb76603b commit r9-10168-g7ce3d2ab2a1a144f94a3a9be716fb831cb76603b Author: Jason Merrill <ja...@redhat.com> Date: Wed Apr 6 22:20:49 2022 -0400 c++: nested generic lambda in DMI [PR101717] We were already checking COMPLETE_TYPE_P to recognize instantiation of a generic lambda, but didn't consider that we might be nested in a non-generic lambda. PR c++/101717 gcc/cp/ChangeLog: * lambda.c (lambda_expr_this_capture): Check all enclosing lambdas for completeness. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/lambda-generic-this4.C: New test.