3 !!DESCRIPTION!! Addition tests - mostly int's
4 !!ORIGIN!! SDCC regression tests
5 !!LICENCE!! GPL, read COPYING.GPL
11 static unsigned int failures = 0;
17 CAUTION: the wraparound behaviour is actually undefined, to get the "expected"
18 behaviour with GCC, use -fwrapv or -fno-strict-overflow
20 see: https://gcc.gnu.org/wiki/FAQ#signed_overflow
26 make sure the reference output uses types with
42 #if defined(REFERENCE) && defined(REFCC_SIZEOF_LONG_64BIT)
43 printf("long0: %d\n", long0);
45 printf("long0: %ld\n", long0);
52 /* wrap around zero */
54 long0 = long0 + 0x2000000L;
55 if(long0 != -0x7f000000L) {
62 /* wrap around zero */
64 long0 = long0 + 0x2000000L;
66 if(long0 != -0x7f000000L) {