struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20001108-1.c
blob3ef48cdb3b70ed422a47d3a45b918fa32c220273
1 /*
2 20001108-1.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 #if !defined(__SDCC_pdk14) // Lack of memory
12 long long
13 signed_poly (long long sum, long x)
15 sum += (long long) (long) sum * (long long) x;
16 return sum;
19 unsigned long long
20 unsigned_poly (unsigned long long sum, unsigned long x)
22 sum += (unsigned long long) (unsigned long) sum * (unsigned long long) x;
23 return sum;
25 #endif
27 void
28 testTortureExecute (void)
30 #if !defined(__SDCC_pdk14) // Lack of memory
31 if (signed_poly (2LL, -3) != -4LL)
32 ASSERT (0);
34 if (unsigned_poly (2ULL, 3) != 8ULL)
35 ASSERT (0);
37 return;
38 #endif