c++: Some cp-tree.def comment fixes
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 931004-2.c
blob775c540cffe35209031f5a00ea5ad9e0b953b595
1 #include <stdarg.h>
3 void abort (void);
4 void exit (int);
6 struct tiny
8 int c;
9 };
11 void
12 f (int n, ...)
14 struct tiny x;
15 int i;
17 va_list ap;
18 va_start (ap,n);
19 for (i = 0; i < n; i++)
21 x = va_arg (ap,struct tiny);
22 if (x.c != i + 10)
23 abort();
26 long x = va_arg (ap, long);
27 if (x != 123)
28 abort();
30 va_end (ap);
33 int
34 main (void)
36 struct tiny x[3];
37 x[0].c = 10;
38 x[1].c = 11;
39 x[2].c = 12;
40 f (3, x[0], x[1], x[2], (long) 123);
41 exit(0);