PPCG 0.09.2
[ppcg.git] / tests / not_accessed.c
blobe5fb89236b83f380b25493042b58041bb24fca29
1 #include <stdlib.h>
3 void copy_summary(int b[1000], int a[1000], int pos, int c[1000])
5 b[pos] = 0;
6 int d = 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, int c[1000]);
14 int main()
16 int a[1000], b[1000], c[1000];
18 for (int i = 0; i < 1000; ++i)
19 a[i] = i;
20 #pragma scop
21 for (int i = 0; i < 1000; ++i)
22 copy(b, a, i, c);
23 #pragma endscop
24 for (int i = 0; i < 1000; ++i)
25 if (b[i] != a[i])
26 return EXIT_FAILURE;
28 return EXIT_SUCCESS;