Commit 11b782f7 by Jason Merrill Committed by Jason Merrill

PR c++/84802 - ICE capturing uninstantiated class.

	* lambda.c (build_capture_proxy): Call complete_type.

From-SVN: r258447
parent 8f1a73b2
2018-03-12 Jason Merrill <jason@redhat.com>
PR c++/84802 - ICE capturing uninstantiated class.
* lambda.c (build_capture_proxy): Call complete_type.
2018-03-09 Jason Merrill <jason@redhat.com> 2018-03-09 Jason Merrill <jason@redhat.com>
PR c++/84770 - ICE with typedef and parameter pack. PR c++/84770 - ICE with typedef and parameter pack.
......
...@@ -432,6 +432,8 @@ build_capture_proxy (tree member, tree init) ...@@ -432,6 +432,8 @@ build_capture_proxy (tree member, tree init)
object = convert (type, ptr); object = convert (type, ptr);
} }
complete_type (type);
var = build_decl (input_location, VAR_DECL, name, type); var = build_decl (input_location, VAR_DECL, name, type);
SET_DECL_VALUE_EXPR (var, object); SET_DECL_VALUE_EXPR (var, object);
DECL_HAS_VALUE_EXPR_P (var) = 1; DECL_HAS_VALUE_EXPR_P (var) = 1;
......
// PR c++/84802
// { dg-do compile { target c++14 } }
template <class T> struct A { };
void f (A<int>& ar)
{
[](const auto& x)
{ return [x]{}(); }
(ar);
}
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