1 /*
2    20060110-2.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16) && !defined(__SDCC_pdk14) // Lack of memory
12 long long
f(long long a,long long b)13 f (long long a, long long b)
14 {
15   return ((a + b) << 32) >> 32;
16 }
17 
18 long long a = 0x1234567876543210LL;
19 long long b = 0x2345678765432101LL;
20 long long c = ((0x1234567876543210LL + 0x2345678765432101LL) << 32) >> 32;
21 #endif
22 
23 void
testTortureExecute(void)24 testTortureExecute (void)
25 {
26 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16) && !defined(__SDCC_pdk14) // Lack of memory
27   ASSERT (f (a, b) == c);
28   return;
29 #endif
30 }
31 
32