Index: cp/lambda.c =================================================================== --- cp/lambda.c (revision 239118) +++ cp/lambda.c (working copy) @@ -492,6 +492,8 @@ add_capture (tree lambda, tree id, tree orig_init, else { type = lambda_capture_field_type (initializer, explicit_init_p); + if (type == error_mark_node) + return error_mark_node; if (by_reference_p) { type = build_reference_type (type); Index: testsuite/g++.dg/cpp1y/lambda-ice1.C =================================================================== --- testsuite/g++.dg/cpp1y/lambda-ice1.C (revision 0) +++ testsuite/g++.dg/cpp1y/lambda-ice1.C (working copy) @@ -0,0 +1,7 @@ +// PR c++/72800 +// { dg-do compile { target c++14 } } + +void foo () +{ + [n {}] {}; // { dg-error "one element|deducing" } +}