struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-930106-1.c
blob9e8d8c197a4064d9bfbd2a8fffaee4ac28770f59
1 /*
2 930106-1.c from the execute part of the gcc torture suite.
3 What is this file supposed to test?
4 Why is there a dummy array?
5 Is f() supposed to return an int?
6 */
8 #include <testfwk.h>
10 #ifdef __SDCC
11 #pragma std_c99
12 #endif
14 //#define DUMMY_SIZE 9
16 double g(void)
18 return 1.0;
21 #if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
22 int f(void)
24 // char dummy[DUMMY_SIZE];
25 double f1, f2, f3;
26 f1 = g();
27 f2 = g();
28 f3 = g();
29 return f1 + f2 + f3;
31 #endif
33 void
34 testTortureExecute (void)
36 #if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
37 ASSERT(f() == 3.0);
38 return;
39 #endif