Commit c18a88c5 by Paolo Carlini Committed by Paolo Carlini

re PR c++/84630 (ICE: TYPE_NAME() used on error_mark_node in tsubst_lambda_expr, at cp/pt.c:17141)

/cp
2018-04-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84630
	* pt.c (tsubst_lambda_expr): Check begin_lambda_type return value
	for error_mark_node.

/testsuite
2018-04-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84630
	* g++.dg/cpp0x/pr84630.C: New.

From-SVN: r259460
parent 19ddb884
2018-04-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84630
* pt.c (tsubst_lambda_expr): Check begin_lambda_type return value
for error_mark_node.
2018-04-18 Jakub Jelinek <jakub@redhat.com> 2018-04-18 Jakub Jelinek <jakub@redhat.com>
PR c++/84463 PR c++/84463
......
...@@ -17570,6 +17570,8 @@ tsubst_lambda_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl) ...@@ -17570,6 +17570,8 @@ tsubst_lambda_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
} }
tree type = begin_lambda_type (r); tree type = begin_lambda_type (r);
if (type == error_mark_node)
return error_mark_node;
/* Do this again now that LAMBDA_EXPR_EXTRA_SCOPE is set. */ /* Do this again now that LAMBDA_EXPR_EXTRA_SCOPE is set. */
determine_visibility (TYPE_NAME (type)); determine_visibility (TYPE_NAME (type));
......
2018-04-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84630
* g++.dg/cpp0x/pr84630.C: New.
2018-04-18 Jakub Jelinek <jakub@redhat.com> 2018-04-18 Jakub Jelinek <jakub@redhat.com>
PR c++/84463 PR c++/84463
......
// PR c++/84630
// { dg-do compile { target c++11 } }
template <typename...> struct c {
template <int> __attribute__((noinline([] {}))) int b(); // { dg-error "wrong number of arguments" }
};
c<> a;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment