support modulo operation in statements
[pet.git] / tests / conditional_assignment.c
blob9c588728e075218e04a2f7751cbf5ccfe6d35963
1 void compute_row(int, int *);
2 int f(const int *);
3 int g(int, int);
4 int h(int);
6 int M;
7 int N;
9 void foo()
11 int i, j;
12 int in1[N][M];
13 int in2[N];
14 int A[N][10];
15 #pragma value_bounds in2 "-1" "1"
16 int C[N];
17 int m;
19 #pragma scop
20 for (i = 0; i < N; ++i) {
21 m = i+1;
22 for (j = 0; j < M; ++j)
23 m = g(h(m), in1[i][j]);
24 compute_row(h(m), A[i]);
26 A[5][6] = 0;
27 for (i = 0; i < N; ++i)
28 if (i + in2[i] >= 0 && i + in2[i] < N)
29 C[i] = f(A[i + in2[i]]);
30 else
31 C[i] = 0;
32 #pragma endscop