https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:252e9dfee9b1d01e0e44773ad83e0e44f3650945 commit r11-10100-g252e9dfee9b1d01e0e44773ad83e0e44f3650945 Author: Jason Merrill <ja...@redhat.com> Date: Thu Jun 23 23:14:35 2022 -0400 c++: dependent generic lambda template-id [PR106024] We were wrongly looking up the generic lambda op() in a dependent scope, and then trying to look up its instantiation at substitution time, but lambdas aren't instantiated, so we crashed. The fix is to not look into dependent lambda scopes. PR c++/106024 gcc/cp/ChangeLog: * parser.c (cp_parser_lookup_name): Don't look in dependent lambda. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-generic10.C: New test.