Makefile.am: add gitversion.h to BUILT_SOURCES
[ppcg.git] / tests / shared_sink.c
blobae3fac2fc1e93b0ad40f9e4b5a6547457b2bfa8c
1 #include <stdlib.h>
3 /* Check that the sources of live ranges with the same sink
4 * are executed in order.
5 */
6 int main()
8 int A[128];
9 int n = 128;
11 A[0] = 0;
12 #pragma scop
13 for (int i = 0; i < n; ++i) {
14 int set = 0;
15 if (A[i] < 2)
16 set = 1;
17 if (set)
18 A[i] = 2;
20 #pragma endscop
21 if (A[0] != 2)
22 return EXIT_FAILURE;
24 return EXIT_SUCCESS;