PPCG 0.09.2
[ppcg.git] / tests / call4.c
blob7002018a14a67f7bd9bcc6cf1f8f8646744bd7e1
1 #include <stdlib.h>
3 int inline get(int a[1000], int pos)
5 int tmp = a[pos];
6 return tmp;
9 int main()
11 int a[1000], b[1000];
13 for (int i = 0; i < 1000; ++i)
14 a[i] = i;
15 #pragma scop
16 for (int i = 0; i < 999; ++i)
17 b[i] = get(a, i) + get(a, i + 1);
18 #pragma endscop
19 for (int i = 0; i < 999; ++i)
20 if (b[i] != a[i] + a[i + 1])
21 return EXIT_FAILURE;
23 return EXIT_SUCCESS;