[PR testsuite/65205, libgomp/65993] Fix dg-shouldfail usage in OpenACC libgomp tests
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-39.c
blob01fdd90ce4fd0e25b49f089ba275bf3455175cea
1 /* { dg-do run } */
3 #include <string.h>
4 #include <stdlib.h>
5 #include <openacc.h>
7 int
8 main (int argc, char **argv)
10 const int N = 256;
11 int i;
12 unsigned char *h;
13 void *d;
15 h = (unsigned char *) malloc (N);
17 for (i = 0; i < N; i++)
19 h[i] = i;
22 d = acc_present_or_copyin (0, N);
23 if (!d)
24 abort ();
26 memset (&h[0], 0, N);
28 acc_copyout (h, N);
30 for (i = 0; i < N; i++)
32 if (h[i] != i)
33 abort ();
36 free (h);
38 return 0;
41 /* { dg-output "\\\[\[^\n\r]*,\\\+256\\\] is a bad range" } */
42 /* { dg-shouldfail "" } */