constexpr.c (cxx_eval_builtin_function_call): Use fold_builtin_call_array.
authorJason Merrill <jason@redhat.com>
Sat, 15 Nov 2014 23:28:51 +0000 (18:28 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 15 Nov 2014 23:28:51 +0000 (18:28 -0500)
* constexpr.c (cxx_eval_builtin_function_call): Use
fold_builtin_call_array.

From-SVN: r217617

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 279e91b92f05c57252fa5b971072beae1d899b48..8508db1047ea47eceac90dc4d0550ae9fa22ddb5 100644 (file)
@@ -1,5 +1,8 @@
 2014-11-15  Jason Merrill  <jason@redhat.com>
 
+       * constexpr.c (cxx_eval_builtin_function_call): Use
+       fold_builtin_call_array.
+
        * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
 
 2014-11-14  Paolo Carlini  <paolo.carlini@oracle.com>
index 0d45f31f48acbe30dd76c7b8bcc00afd2cc598ad..66d356f2416aaf8f3a874857f99a5e6f92cc20ae 100644 (file)
@@ -995,9 +995,8 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t,
     }
   if (*non_constant_p)
     return t;
-  new_call = build_call_array_loc (EXPR_LOCATION (t), TREE_TYPE (t),
-                                   CALL_EXPR_FN (t), nargs, args);
-  new_call = fold (new_call);
+  new_call = fold_builtin_call_array (EXPR_LOCATION (t), TREE_TYPE (t),
+                                     CALL_EXPR_FN (t), nargs, args);
   VERIFY_CONSTANT (new_call);
   return new_call;
 }