Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/va-arg-18.c

raw
1 #include <stdarg.h>
2
3 void abort (void);
4 void exit (int);
5
6 typedef double L;
7 void f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...)
8 {
9 va_list select;
10
11 va_start (select, p8);
12
13 if (va_arg (select, int) != 10)
14 abort ();
15 if (va_arg (select, int) != 11)
16 abort ();
17 if (va_arg (select, int) != 12)
18 abort ();
19
20 va_end (select);
21 }
22
23 int main ()
24 {
25 f (1., 2., 3., 4., 5., 6., 7., 8., 9., 10, 11, 12);
26 exit (0);
27 }