aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-03-12 08:58:38 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-03-12 08:58:38 -0400
commit11b782f7f205c3e88efe89347cd9d80c3525e6ac (patch)
treefad0a2abb8184d8d357fe3b4f4ca32ce6a05f51d /gcc/cp
parent8f1a73b2bb0d399fa6784a2f365fa8dd3ae007f5 (diff)
downloadgcc-11b782f7f205c3e88efe89347cd9d80c3525e6ac.zip
gcc-11b782f7f205c3e88efe89347cd9d80c3525e6ac.tar.gz
gcc-11b782f7f205c3e88efe89347cd9d80c3525e6ac.tar.bz2
PR c++/84802 - ICE capturing uninstantiated class.
* lambda.c (build_capture_proxy): Call complete_type. From-SVN: r258447
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/lambda.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7ed0d5e..703f597 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR c++/84770 - ICE with typedef and parameter pack.
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index de064ff..b3c75c8 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -432,6 +432,8 @@ build_capture_proxy (tree member, tree init)
object = convert (type, ptr);
}
+ complete_type (type);
+
var = build_decl (input_location, VAR_DECL, name, type);
SET_DECL_VALUE_EXPR (var, object);
DECL_HAS_VALUE_EXPR_P (var) = 1;