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 e74b79c..251c344 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -646,6 +646,9 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain)
tree rval = build_aggr_init_expr (type, init);
tree slot;
+ if (init == error_mark_node)
+ return error_mark_node;
+
if (!complete_type_or_maybe_complain (type, init, complain))
return error_mark_node;