PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 931004-10.c
blobcf0125dba62f3784c5c28508142f1d4da534e39c
1 #include <stdarg.h>
3 struct tiny
5 char c;
6 char d;
7 };
9 f (int n, ...)
11 struct tiny x;
12 int i;
14 va_list ap;
15 va_start (ap,n);
16 for (i = 0; i < n; i++)
18 x = va_arg (ap,struct tiny);
19 if (x.c != i + 10)
20 abort();
21 if (x.d != i + 20)
22 abort();
25 long x = va_arg (ap, long);
26 if (x != 123)
27 abort();
29 va_end (ap);
32 main ()
34 struct tiny x[3];
35 x[0].c = 10;
36 x[1].c = 11;
37 x[2].c = 12;
38 x[0].d = 20;
39 x[1].d = 21;
40 x[2].d = 22;
41 f (3, x[0], x[1], x[2], (long) 123);
42 exit(0);