new file mode 100644
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+static inline int __attribute__((__always_inline__))
+foo ()
+{
+ return log_bad_request(0, __builtin_va_arg_pack()); /* { dg-warning "implicit" } */
+}
+void log_bad_request() { foo (0); } /* { dg-warning "conflicting types" } */
@@ -2100,6 +2100,7 @@ copy_bb (copy_body_data *id, basic_block bb,
GF_CALL_VA_ARG_PACK. */
gimple_call_copy_flags (new_call, call_stmt);
gimple_call_set_va_arg_pack (new_call, false);
+ gimple_call_set_fntype (new_call, gimple_call_fntype (call_stmt));
/* location includes block. */
gimple_set_location (new_call, gimple_location (stmt));
gimple_call_set_lhs (new_call, gimple_call_lhs (call_stmt));