aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 1b484b1..6dc33b9 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -469,6 +469,9 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain)
tree rval = build_aggr_init_expr (type, init);
tree slot;
+ if (!complete_type_or_maybe_complain (type, init, complain))
+ return error_mark_node;
+
/* Make sure that we're not trying to create an instance of an
abstract class. */
if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))