struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-961206-1.c
blob09af22d27619daa4807396e3c968927709ece72f
1 /*
2 961206-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 // TODO: Enable when sdcc supports long long in these ports!
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 int
14 sub1 (unsigned long long i)
16 if (i < 0x80000000)
17 return 1;
18 else
19 return 0;
22 int
23 sub2 (unsigned long long i)
25 if (i <= 0x7FFFFFFF)
26 return 1;
27 else
28 return 0;
31 int
32 sub3 (unsigned long long i)
34 if (i >= 0x80000000)
35 return 0;
36 else
37 return 1;
40 int
41 sub4 (unsigned long long i)
43 if (i > 0x7FFFFFFF)
44 return 0;
45 else
46 return 1;
48 #endif
50 void
51 testTortureExecute (void)
53 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
54 if (sub1 (0x80000000ULL))
55 ASSERT (0);
57 if (sub2 (0x80000000ULL))
58 ASSERT (0);
60 if (sub3 (0x80000000ULL))
61 ASSERT (0);
63 if (sub4 (0x80000000ULL))
64 ASSERT (0);
66 return;
67 #endif