update pet for preserving array extents in case of empty context
[ppcg.git] / tests / non_parallel_struct.c
blob7423b5a47021ce5dd1aca9436dd9ccd5602434ff
1 #include <stdlib.h>
3 struct S {
4 int v;
5 };
7 int main()
9 int a[1000], s;
10 struct S b[1000];
12 for (int i = 0; i < 1000; ++i)
13 a[i] = 1 + i;
14 #pragma scop
15 b[0].v = 1;
16 s = b[0].v;
17 for (int i = 1; i < 1000; ++i)
18 b[i].v = s + i;
19 #pragma endscop
20 for (int i = 0; i < 1000; ++i)
21 if (b[i].v != a[i])
22 return EXIT_FAILURE;
24 return EXIT_SUCCESS;