https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82882
--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Fri Jun 15 20:23:13 2018 New Revision: 261658 URL: https://gcc.gnu.org/viewcvs?rev=261658&root=gcc&view=rev Log: PR c++/82882 - ICE with lambda in template default argument. * lambda.c (record_null_lambda_scope): New. * pt.c (tsubst_lambda_expr): Use it. * name-lookup.c (do_pushtag): Don't give a lambda DECL_CONTEXT of a function that isn't open. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg8.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/cp-tree.h branches/gcc-8-branch/gcc/cp/lambda.c branches/gcc-8-branch/gcc/cp/name-lookup.c branches/gcc-8-branch/gcc/cp/pt.c