PR middle-end/30262
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / va-arg-1.c
blob3f3b141a931767a25a2e0c7e014e5bc3f7eda6d1
1 #include <stdarg.h>
3 typedef unsigned long L;
4 f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...)
6 va_list select;
8 va_start (select, p8);
10 if (va_arg (select, L) != 10)
11 abort ();
12 if (va_arg (select, L) != 11)
13 abort ();
14 if (va_arg (select, L) != 0)
15 abort ();
17 va_end (select);
20 main ()
22 f (1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 0L);
23 exit (0);