Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / va-arg-11.c
blob5b4a1425d662fb0a2ef3d43ca065cd59ef186913
1 /* Test va_arg when the result is ignored and only the pointer increment
2 side effect is used. */
3 #include <stdarg.h>
5 void abort (void);
6 void exit (int);
8 static int
9 foo (int a, ...)
11 va_list va;
12 int i, res;
14 va_start (va, a);
16 for (i = 0; i < 4; ++i)
17 (void) va_arg (va, int);
19 res = va_arg (va, int);
21 va_end (va);
23 return res;
26 int
27 main (void)
29 if (foo (5, 4, 3, 2, 1, 0))
30 abort ();
31 exit (0);