struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20020413-1.c
blob3b973b5a28ac5d4408facdf4c5768dff19cf5ebb
1 /*
2 20020413-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #if 0 // TODO: Enable when long double is supported!
12 void ftest(long double val, int *eval)
14 long double tmp = 1.0l;
15 int i = 0;
17 if (val < 0.0l)
18 val = -val;
20 if (val >= tmp)
21 while (tmp < val)
23 tmp *= 2.0l;
24 if (i++ >= 10)
25 ASSERT (0);
27 else if (val != 0.0l)
28 while (val < tmp)
30 tmp /= 2.0l;
31 if (i++ >= 10)
32 ASSERT (0);
35 *eval = i;
37 #endif
39 void testTortureExecute(void)
41 #if 0
42 int eval;
44 ftest(3.0, &eval);
45 ftest(3.5, &eval);
46 ftest(4.0, &eval);
47 ftest(5.0, &eval);
48 return;
49 #endif