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-20020307-1.c
blob3bd901ca63c13ede0e9797eb1220a9e60dfc8193
1 /*
2 20020307-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 #define MASK(N) ((1UL << (N)) - 1)
12 #define BITS(N) ((1UL << ((N) - 1)) + 2)
14 #define FUNC(N) void f##N(long j) { if ((j & MASK(N)) >= BITS(N)) ASSERT (0);}
16 FUNC(3)
17 FUNC(4)
18 #ifndef __SDCC_pdk14 // Lack of memory
19 FUNC(5)
20 FUNC(6)
21 FUNC(7)
22 FUNC(8)
23 #ifndef __SDCC_pdk15 // Lack of memory
24 FUNC(9)
25 FUNC(10)
26 FUNC(11)
27 FUNC(12)
28 FUNC(13)
29 FUNC(14)
30 FUNC(15)
31 FUNC(16)
32 FUNC(17)
33 FUNC(18)
34 FUNC(19)
35 FUNC(20)
36 FUNC(21)
37 FUNC(22)
38 FUNC(23)
39 FUNC(24)
40 FUNC(25)
41 FUNC(26)
42 FUNC(27)
43 FUNC(28)
44 FUNC(29)
45 FUNC(30)
46 FUNC(31)
47 #endif
48 #endif
50 void
51 testTortureExecute (void)
53 f3(0);
54 f4(0);
55 #ifndef __SDCC_pdk14 // Lack of memory
56 f5(0);
57 f6(0);
58 f7(0);
59 f8(0);
60 #ifndef __SDCC_pdk15 // Lack of memory
61 f9(0);
62 f10(0);
63 f11(0);
64 f12(0);
65 f13(0);
66 f14(0);
67 f15(0);
68 f16(0);
69 f17(0);
70 f18(0);
71 f19(0);
72 f20(0);
73 f21(0);
74 f22(0);
75 f23(0);
76 f24(0);
77 f25(0);
78 f26(0);
79 f27(0);
80 f28(0);
81 f29(0);
82 f30(0);
83 f31(0);
84 #endif
85 #endif
86 return;