C++: simplify output from suggest_alternatives_for
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / declare-vla.c
blob3ea148ed40db2449da0a18e8d653818d7e1cb992
1 /* Verify that acc declare accept VLA variables. */
3 #include <assert.h>
5 int
6 main ()
8 int N = 1000;
9 int i, A[N];
10 #pragma acc declare copy(A)
12 for (i = 0; i < N; i++)
13 A[i] = -i;
15 #pragma acc kernels
16 for (i = 0; i < N; i++)
17 A[i] = i;
19 #pragma acc update host(A)
21 for (i = 0; i < N; i++)
22 assert (A[i] == i);
24 return 0;