* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-12.c
blobb46f59028b7cba39560e5d12989b26ba24464b7a
1 /* { dg-do run } */
2 /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
4 #include <string.h>
5 #include <stdlib.h>
6 #include <openacc.h>
8 int
9 main (int argc, char **argv)
11 const int N = 256;
12 int i;
13 unsigned char *h;
15 h = (unsigned char *) malloc (N);
17 for (i = 0; i < N; i++)
19 h[i] = i;
22 (void) acc_copyin (h, N);
24 memset (h, 0, N);
26 acc_copyout (h, N);
28 for (i = 0; i < N; i++)
30 if (h[i] != i)
31 abort ();
34 free (h);
36 return 0;