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-960801-1.c
blobc21bffecaba621911e25c0af8ade659acaebf31c
1 /*
2 960801-1.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 // Some ports do not yet support long long.
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 unsigned
14 f ()
16 long long l2;
17 unsigned short us;
18 unsigned long long ul;
19 short s2;
21 ul = us = l2 = s2 = -1;
22 return ul;
25 unsigned long long
26 g ()
28 long long l2;
29 unsigned short us;
30 unsigned long long ul;
31 short s2;
33 ul = us = l2 = s2 = -1;
34 return ul;
36 #endif
38 void
39 testTortureExecute (void)
41 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
42 if (f () != (unsigned short) -1)
43 ASSERT (0);
44 if (g () != (unsigned short) -1)
45 ASSERT (0);
46 return;
47 #endif