https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69658

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just a shot in the dark:
--- gcc/cp/init.c.jj    2016-01-29 12:12:46.000000000 +0100
+++ gcc/cp/init.c       2016-02-04 14:49:15.383997315 +0100
@@ -1636,16 +1636,15 @@ expand_default_init (tree binfo, tree tr
       gcc_checking_assert ((flags & LOOKUP_ONLYCONVERTING) == 0
                           && TREE_CHAIN (init) == NULL_TREE);
       init = TREE_VALUE (init);
+      if (BRACE_ENCLOSED_INITIALIZER_P (init) && CP_AGGREGATE_TYPE_P (type))
+       init = reshape_init (type, init, complain);
     }

   if (init && BRACE_ENCLOSED_INITIALIZER_P (init)
       && CP_AGGREGATE_TYPE_P (type))
     /* A brace-enclosed initializer for an aggregate.  In C++0x this can
        happen for direct-initialization, too.  */
-    {
-      init = reshape_init (type, init, complain);
-      init = digest_init (type, init, complain);
-    }
+    init = digest_init (type, init, complain);

   /* A CONSTRUCTOR of the target's type is a previously digested
      initializer, whether that happened just above or in

will call reshape_init on mem-init-aggr1.C where we want it and not on this new
testcase where we've already done that and don't want to do that again.
But whether it is the right fix, no idea.

Reply via email to