blob: f56ad88d990d0fb5886a05eef6ee229c56657a9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-do link } */
/* { dg-require-effective-target lto } */
/* { dg-additional-options "-flto" } */
/* { dg-additional-sources stdarg-lto-1-b.c } */
#include <stdarg.h>
#include "stdarg-lto-1.h"
/* Type mismatch: expect const char *, but passed an int. */
void
called_by_test_type_mismatch_1 (int placeholder, ...)
{
const char *str;
va_list ap;
va_start (ap, placeholder);
str = va_arg (ap, const char *); /* { dg-warning "'va_arg' expected '\[^\n\r\]*' but received 'int' for variadic argument 1 of 'ap'" } */
va_end (ap);
}
int main() { return 0; }
|