summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20020307-1.c
blob: 3bd901ca63c13ede0e9797eb1220a9e60dfc8193 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
   20020307-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#define MASK(N) ((1UL << (N)) - 1)
#define BITS(N) ((1UL << ((N) - 1)) + 2)

#define FUNC(N) void f##N(long j) { if ((j & MASK(N)) >= BITS(N)) ASSERT (0);}

FUNC(3)
FUNC(4)
#ifndef __SDCC_pdk14 // Lack of memory
FUNC(5)
FUNC(6)
FUNC(7)
FUNC(8)
#ifndef __SDCC_pdk15 // Lack of memory
FUNC(9)
FUNC(10)
FUNC(11)
FUNC(12)
FUNC(13)
FUNC(14)
FUNC(15)
FUNC(16)
FUNC(17)
FUNC(18)
FUNC(19)
FUNC(20)
FUNC(21)
FUNC(22)
FUNC(23)
FUNC(24)
FUNC(25)
FUNC(26)
FUNC(27)
FUNC(28)
FUNC(29)
FUNC(30)
FUNC(31)
#endif
#endif

void
testTortureExecute (void)
{
  f3(0);
  f4(0);
#ifndef __SDCC_pdk14 // Lack of memory
  f5(0);
  f6(0);
  f7(0);
  f8(0);
#ifndef __SDCC_pdk15 // Lack of memory
  f9(0);
  f10(0);
  f11(0);
  f12(0);
  f13(0);
  f14(0);
  f15(0);
  f16(0);
  f17(0);
  f18(0);
  f19(0);
  f20(0);
  f21(0);
  f22(0);
  f23(0);
  f24(0);
  f25(0);
  f26(0);
  f27(0);
  f28(0);
  f29(0);
  f30(0);
  f31(0);
#endif
#endif
  return;
}