Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20041113-1.c
blobe98113ae124d260c28036275021626cf6c5749ae
1 /*
2 20041113-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 93
10 #endif
12 #pragma disable_warning 85
14 #include <stdarg.h>
16 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
17 void test (int x, ...)
19 va_list ap;
20 int i;
21 va_start (ap, x);
22 if (va_arg (ap, int) != 1)
23 ASSERT (0);
24 if (va_arg (ap, int) != 2)
25 ASSERT (0);
26 if (va_arg (ap, int) != 3)
27 ASSERT (0);
28 if (va_arg (ap, int) != 4)
29 ASSERT (0);
32 double a = 40.0;
33 #endif
35 void testTortureExecute (void)
37 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
38 test(0, 1, 2, 3, (int)(a / 10.0));
39 return;
40 #endif