struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20001031-1.c
blob613403d9b2ddabb520e9e764a18b87836137bed5
1 /*
2 20001031-1.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 // TODO: Enable when long long comes to these ports!
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 void t1 (int x)
15 if (x != 4100)
16 ASSERT (0);
19 int t2 (void)
21 int i;
22 t1 ((i = 4096) + 4);
23 return i;
26 void t3 (long long x)
28 if (x != 0x80000fffULL)
29 ASSERT (0);
32 long long t4 (void)
34 long long i;
35 t3 ((i = 4096) + 0x7fffffffULL);
36 return i;
38 #endif
40 void
41 testTortureExecute (void)
43 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
44 if (t2 () != 4096)
45 ASSERT (0);
46 if (t4 () != 4096)
47 ASSERT (0);
48 return;
49 #endif