struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr79121.c
blob342f512b89f95d88e28562e9f13956fd2280fb6c
1 /*
2 pr79043.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 #include <stdint.h>
13 #ifndef __SDCC_pdk14 // Lack of memory
14 unsigned long long f1 (int32_t x)
16 return ((unsigned long long) x) << 4;
19 long long f2 (uint32_t x)
21 return ((long long) x) << 4;
24 unsigned long long f3 (uint32_t x)
26 return ((unsigned long long) x) << 4;
29 long long f4 (int32_t x)
31 return ((long long) x) << 4;
33 #endif
35 void
36 testTortureExecute (void)
38 #ifndef __SDCC_pdk14 // Lack of memory
39 if (f1 (0xf0000000) != 0xffffffff00000000)
40 ASSERT (0);
41 if (f2 (0xf0000000) != 0xf00000000)
42 ASSERT (0);
43 if (f3 (0xf0000000) != 0xf00000000)
44 ASSERT (0);
45 if (f4 (0xf0000000) != 0xffffffff00000000)
46 ASSERT (0);
47 return;
48 #endif