2 va-arg-5.c from the execute part of the gcc torture tests.
10 va_double (int n
, ...)
16 ASSERT(va_arg (args
, double) == 3.141592);
17 ASSERT(va_arg (args
, double) == 2.71827);
18 ASSERT(va_arg (args
, double) == 2.2360679);
19 ASSERT(va_arg (args
, double) == 2.1474836);
23 #if 0 // TODO: Enable when SDCC supports long double!
25 va_long_double (int n
, ...)
31 ASSERT(va_arg (args
, long double) == 3.141592L);
32 ASSERT(va_arg (args
, long double) == 2.71827L);
33 ASSERT(va_arg (args
, long double) == 2.2360679L);
34 ASSERT(va_arg (args
, long double) == 2.1474836L);
40 testTortureExecute (void)
42 #ifndef __SDCC_pdk14 // Lack of memory
43 #if !(defined (__GNUC__) && __GNUC__ < 12) // Test fails on older GCC on 32-bit systems
44 va_double (4, 3.141592, 2.71827, 2.2360679, 2.1474836);
46 va_long_double (4, 3.141592L, 2.71827L, 2.2360679L, 2.1474836L);