1 /*
2    930603-1.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
fx(float x)12 float fx (float x)
13 {
14   return 1.0 + 3.0 / (2.302585093 * x);
15 }
16 
17 float inita ();
18 float initc ();
19 void f ();
20 #endif
21 
22 void
testTortureExecute(void)23 testTortureExecute (void)
24 {
25 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
26   float a, b, c;
27   a = inita ();
28   c = initc ();
29   f ();
30   b = fx (c) + a;
31   f ();
32   if (a != 3.0 || b < 4.3257 || b > 4.3258 || c != 4.0)
33     ASSERT (0);
34   return;
35 #endif
36 }
37 
inita()38 float inita () { return 3.0; }
initc()39 float initc () { return 4.0; }
f()40 void f () {}
41 
42