init.c (perform_member_init): Always build_aggr_init for a class member with an expli...
authorJason Merrill <jason@redhat.com>
Fri, 5 Aug 2011 19:12:09 +0000 (15:12 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Aug 2011 19:12:09 +0000 (15:12 -0400)
* init.c (perform_member_init): Always build_aggr_init
for a class member with an explicit mem-initializer.

From-SVN: r177477

gcc/cp/ChangeLog
gcc/cp/init.c

index 3d9b3b6f71eeb2fc034fdedfb9095b88be37f616..8eb6b74c3ce0ed51cf773c2e54988462cef61630 100644 (file)
@@ -1,5 +1,8 @@
 2011-08-05  Jason Merrill  <jason@redhat.com>
 
+       * 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  <jakub@redhat.com>
index 31171cfa68653de8a7b4f0e687470c48688e1a6d..d9e475e79de579486b33337c086d84c148f7f689 100644 (file)
@@ -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)
        {