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

--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think this is the fix:

--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1251,8 +1251,7 @@ massage_init_elt (tree type, tree init, int nested,
tsubst_flags_t complain)
     init = TARGET_EXPR_INITIAL (init);
   /* When we defer constant folding within a statement, we may want to
      defer this folding as well.  */
-  tree t = fold_non_dependent_expr (init);
-  t = maybe_constant_init (t);
+  tree t = fold_non_dependent_init (init);
   if (TREE_CONSTANT (t))
     init = t;
   return init;

(implementation of fold_non_dependent_init intentionally omitted here).

Reply via email to