struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20060110-2.c
blob116ba242fae272232715fd06b143e265bdf9b9b2
1 /*
2 20060110-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 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16) && !defined(__SDCC_pdk14) // Lack of memory
12 long long
13 f (long long a, long long b)
15 return ((a + b) << 32) >> 32;
18 long long a = 0x1234567876543210LL;
19 long long b = 0x2345678765432101LL;
20 long long c = ((0x1234567876543210LL + 0x2345678765432101LL) << 32) >> 32;
21 #endif
23 void
24 testTortureExecute (void)
26 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16) && !defined(__SDCC_pdk14) // Lack of memory
27 ASSERT (f (a, b) == c);
28 return;
29 #endif