struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-990829-1.c
blobb8bacce87b63a77e1799d79111fd24278790b276
1 /*
2 990829-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 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
13 double test (const double le, const double ri)
15 double val = ( ri - le ) / ( ri * ( le + 1.0 ) );
16 return val;
18 #endif
20 void
21 testTortureExecute (void)
23 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
24 double retval;
26 retval = test(1.0,2.0);
27 if (retval < 0.24 || retval > 0.26)
28 ASSERT (0);
29 return;
30 #endif