@@ -6437,7 +6437,10 @@ cxx_eval_builtin_function_call (const constexpr_call *call, tree t,
return t;
new_call = build_call_array_loc (EXPR_LOCATION (t), TREE_TYPE (t),
CALL_EXPR_FN (t), nargs, args);
- return fold (new_call);
+ new_call = fold (new_call);
+ if (!TREE_CONSTANT (new_call))
+ *non_constant_p = true;
+ return new_call;
}
/* TEMP is the constant value of a temporary object of type TYPE. Adjust
new file mode 100644
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// { dg-options "-O0 -fdump-tree-gimple" }
+
+main ()
+{
+ char s[10];
+ const int t = (__builtin_memcpy (s, "Hello", 6), 777);
+ __builtin_printf ("%d %s\n", t, s);
+}
+
+// { dg-final { scan-tree-dump-times "memcpy" 1 "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }