struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-loop-8.c
blob227fc20c6aa54e012a832bf67943c0f62021ac06
1 /*
2 loop-8.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #pragma disable_warning 93 // Using float for double.
13 #ifndef __SDCC_pdk14 // Lackof memory
14 double a[3] = { 0.0, 1.0, 2.0 };
16 void bar (int x, double *y)
18 if (x || *y != 1.0)
19 ASSERT (0);
21 #endif
23 void
24 testTortureExecute (void)
26 #ifndef __SDCC_pdk14 // Lackof memory
27 double c;
28 int d;
29 for (d = 0; d < 3; d++)
31 c = a[d];
32 if (c > 0.0) goto e;
34 bar(1, &c);
35 return;
37 bar(0, &c);
38 return;
39 #endif