update pet to version 0.11.4
[ppcg.git] / tests / call2.c
blob1cfc85cdf0d2ef680dffb02a05e1149a748fe025
1 #include <stdlib.h>
3 void copy_summary(int b[1000], int a[1000], int pos)
5 b[pos] = 0;
6 int c = a[pos];
9 #ifdef pencil_access
10 __attribute__((pencil_access(copy_summary)))
11 #endif
12 void copy(int b[1000], int a[1000], int pos);
14 int main()
16 int a[2][1000];
18 for (int i = 0; i < 1000; ++i)
19 a[0][i] = i;
20 #pragma scop
21 for (int i = 0; i < 1000; ++i)
22 copy(a[1], a[0], i);
23 #pragma endscop
24 for (int i = 0; i < 1000; ++i)
25 if (a[1][i] != a[0][i])
26 return EXIT_FAILURE;
28 return EXIT_SUCCESS;