c++: Fix ICE-on-invalid with lambda template [PR94507]
While reducing something else I noticed that we ICE on the following invalid code. In tsubst_lambda_expr, tsubst_template_decl has already reported an error and returned the error_mark_node, so make sure we don't ICE on that. I'm using a goto here because we still have to do finish_struct because it does popclass (). PR c++/94507 - ICE-on-invalid with lambda template. * pt.c (tsubst_lambda_expr): Cope when tsubst_template_decl or tsubst_function_decl returns error_mark_node. * g++.dg/cpp2a/lambda-generic7.C: New test.
Showing
gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C
0 → 100644
Please
register
or
sign in
to comment