struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-float-floor.c
blob154f4b91b1008554a3a756418385345fa0e3ffe5
1 /*
2 float-floor.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 93
9 #endif
11 #if(__SIZEOF_DOUBLE__==8)
12 double d = 1024.0 - 1.0 / 32768.0;
13 #else
14 double d = 1024.0 - 1.0 / 16384.0;
15 #endif
17 extern double floor(double);
18 extern float floorf(float);
20 void
21 testTortureExecute (void)
23 #if 0 // Enable when floor and floorf are supported in SDCC
24 double df = floor(d);
25 float f1 = (float)floor(d);
27 if ((int)df != 1023 || (int)f1 != 1023)
28 ASSERT (0);
30 return;
31 #endif