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