struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-va-arg-19.c
blob228dd02869a4974d5e0d8eff8b9bec3d40a49596
1 /*
2 va-arg-19.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #include <stdarg.h>
9 typedef int TYPE;
11 void vafunction (char *dummy, ...)
13 va_list ap;
15 va_start(ap, dummy);
16 if (va_arg (ap, TYPE) != 1)
17 ASSERT(0);
18 if (va_arg (ap, TYPE) != 2)
19 ASSERT(0);
20 if (va_arg (ap, TYPE) != 3)
21 ASSERT(0);
22 if (va_arg (ap, TYPE) != 4)
23 ASSERT(0);
24 if (va_arg (ap, TYPE) != 5)
25 ASSERT(0);
26 if (va_arg (ap, TYPE) != 6)
27 ASSERT(0);
28 if (va_arg (ap, TYPE) != 7)
29 ASSERT(0);
30 if (va_arg (ap, TYPE) != 8)
31 ASSERT(0);
32 if (va_arg (ap, TYPE) != 9)
33 ASSERT(0);
34 va_end(ap);
38 void
39 testTortureExecute (void)
41 vafunction( "", 1, 2, 3, 4, 5, 6, 7, 8, 9 );
42 return;