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-20011126-1.c
blob3e3a1ba71d440201b6ccf8d026e19e134f5dfcef
1 /*
2 20011126-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 /* Produced a overflow in ifcvt.c, causing S to contain 0xffffffff7fffffff. */
13 int a = 1;
15 void
16 testTortureExecute (void)
18 // Some ports do not support long long yet.
19 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
20 long long s;
22 s = a;
23 if (s < 0)
24 s = -2147483648LL;
25 else
26 s = 2147483647LL;
28 if (s < 0)
29 ASSERT (0);
31 return;
32 #endif