From a034826198b7711835f21307c6976926442f5b97 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 5 Aug 2011 15:12:09 -0400 Subject: [PATCH] init.c (perform_member_init): Always build_aggr_init for a class member with an explicit mem-initializer. * init.c (perform_member_init): Always build_aggr_init for a class member with an explicit mem-initializer. From-SVN: r177477 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/init.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3d9b3b6f71e..8eb6b74c3ce 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-05 Jason Merrill + * init.c (perform_member_init): Always build_aggr_init + for a class member with an explicit mem-initializer. + * pt.c (unify) [TEMPLATE_TYPE_PARM]: Allow VLA for C++0x 'auto'. 2011-08-04 Jakub Jelinek diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 31171cfa686..d9e475e79de 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -547,7 +547,8 @@ perform_member_init (tree member, tree init) finish_expr_stmt (init); } } - else if (type_build_ctor_call (type)) + else if (type_build_ctor_call (type) + || (init && CLASS_TYPE_P (strip_array_types (type)))) { if (TREE_CODE (type) == ARRAY_TYPE) { -- 2.30.2