struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20020219-1.c
blob0d6b8a2137c5b315b5da33f5f85318bc7d4ee668
1 /*
2 20020219-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 // Some ports do not yet support long long
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
14 /* PR c/4308
15 This testcase failed because 0x8000000000000000 >> 0
16 was incorrectly folded into 0xffffffff00000000. */
18 long long foo (void)
20 long long C = 1ULL << 63, X;
21 int Y = 32;
22 X = C >> (Y & 31);
23 return X;
25 #endif
27 void testTortureExecute (void)
29 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
30 if (foo () != 1ULL << 63)
31 ASSERT (0);
32 return;
33 #endif