diff options
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 5a4f91c..9c3dd32 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -314,9 +314,11 @@ build_value_init (tree type, tsubst_flags_t complain) tree ctor = build_special_member_call (NULL_TREE, complete_ctor_identifier, NULL, type, LOOKUP_NORMAL, complain); - - ctor = build_aggr_init_expr (type, ctor); - AGGR_INIT_ZERO_FIRST (ctor) = 1; + if (ctor != error_mark_node) + { + ctor = build_aggr_init_expr (type, ctor); + AGGR_INIT_ZERO_FIRST (ctor) = 1; + } return ctor; } } |