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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- constexpr.c.xx      2016-03-11 17:37:42.000000000 +0100
+++ constexpr.c 2016-03-18 18:35:11.302453270 +0100
@@ -1245,7 +1245,10 @@ cxx_eval_call_expression (const constexp
       if (call_expr_nargs (t) == 2)
        {
          tree arg = convert_from_reference (get_nth_callarg (t, 1));
-         return cxx_eval_constant_expression (ctx, arg,
+         tree dest = get_nth_callarg (t, 0);
+         dest = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (dest)), dest);
+         tree set = build2 (MODIFY_EXPR, void_type_node, dest, arg);
+         return cxx_eval_constant_expression (ctx, set,
                                               lval, non_constant_p,
                                               overflow_p);
        }

doesn't work though, so I'll defer this to Jason.  As for the priority, P2 is
right, we've already shipped GCC 5.[123] with this bug, so it can't be a
release blocker, but is of course very much desirable to get fixed for GCC 6.

Reply via email to