update pet for preserving array extents in case of empty context
[ppcg.git] / tests / call5.c
blob30c3fac3c5a1339c7dbc2d95bb65b628852b61e0
1 #include <stdlib.h>
3 int inline add_one(int i)
5 return i + 1;
8 int main()
10 int a[1000], b[1000];
12 for (int i = 0; i < 1000; ++i)
13 a[i] = i;
14 #pragma scop
15 for (int i = 0; i < 999; ++i)
16 b[i] = add_one(add_one(a[i]));
17 #pragma endscop
18 for (int i = 0; i < 999; ++i)
19 if (b[i] != a[i] + 2)
20 return EXIT_FAILURE;
22 return EXIT_SUCCESS;