Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.c-torture / execute / va-arg-11.c
blobb178b880d4550a43d21c6e8a63ec85961ffcc7ac
1 /* Test va_arg when the result is ignored and only the pointer increment
2 side effect is used. */
3 #include <stdarg.h>
5 static int
6 foo (int a, ...)
8 va_list va;
9 int i, res;
11 va_start (va, a);
13 for (i = 0; i < 4; ++i)
14 (void) va_arg (va, int);
16 res = va_arg (va, int);
18 va_end (va);
20 return res;
23 int
24 main (void)
26 if (foo (5, 4, 3, 2, 1, 0))
27 abort ();
28 exit (0);