PetScan::extract_argument: only perform write detection optionally
[pet.git] / tests / summary2.c
blob68377688cde4948e88d5b249b4667144c003761c
1 int f(int i);
2 int maybe();
4 struct s {
5 int a;
6 };
8 void set_odd_summary(int n, struct s A[static n])
10 for (int i = 1; i < n; i += 2)
11 if (maybe())
12 A[i].a = 0;
15 __attribute__((pencil_access(set_odd_summary)))
16 void set_odd(int n, struct s A[static n]);
18 void set_odd(int n, struct s A[static n])
20 for (int i = 0; i < n; ++i)
21 A[2 * f(i) + 1].a = i;
24 void foo(int n, struct s A[static n])
26 #pragma scop
27 set_odd(n, A);
28 #pragma endscop