Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-921202-2.c
blobf56af093c3735debd8e3a0447876753552d0bb5e
1 /*
2 921202-2.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 support long long yet.
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 int
14 f(long long x)
16 x >>= 8;
17 return x & 0xff;
19 #endif
21 void
22 testTortureExecute (void)
24 // Some ports do not support long long yet.
25 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
26 if (f(0x0123456789ABCDEFLL) != 0xCD)
27 ASSERT(0);
28 return;
29 #endif