struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-va-arg-18.c
blob51c89960ec0ab60bf1816b4ed7fe31dcf60b09b2
1 /*
2 va-arg-18.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 85
9 #pragma disable_warning 93
10 #endif
12 #include <stdarg.h>
14 typedef double L;
15 void f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...)
17 va_list select;
19 va_start (select, p8);
21 if (va_arg (select, int) != 10)
22 ASSERT(0);
23 if (va_arg (select, int) != 11)
24 ASSERT(0);
25 if (va_arg (select, int) != 12)
26 ASSERT(0);
28 va_end (select);
31 void
32 testTortureExecute (void)
34 #ifndef __SDCC_pdk14 // Lack of memory
35 f (1., 2., 3., 4., 5., 6., 7., 8., 9., 10, 11, 12);
36 return;
37 #endif