1 #include <stdio.h>
2
3 #ifndef N
4 #define N 65
5 #endif
6
7 #ifndef TYPE
8 #define TYPE uint32_t
9 #endif
10
11 #ifndef DEBUG
12 #define DEBUG 0
13 #endif
14
15 #define BASE ((TYPE) -1 < 0 ? -126 : 4)
16
17 int main ()
18 {
19 TYPE a[N];
20 TYPE b[N];
21
22 for (int i = 0; i < N; ++i)
23 {
24 a[i] = BASE + i * 13;
25 b[i] = BASE + i * 13;
26 if (DEBUG)
27 printf ("%d: 0x%x\n", i, a[i]);
28 }
29
30 fun1 (a, N);
31 fun2 (b, N);
32
33 for (int i = 0; i < N; ++i)
34 {
35 if (DEBUG)
36 printf ("%d = 0x%x == 0x%x\n", i, a[i], b[i]);
37
38 if (a[i] != b[i])
39 __builtin_abort ();
40 }
41 return 0;
42 }
43