C++: simplify output from suggest_alternatives_for
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-43.c
blob5db29124e9ec5bc48667aa14e4d3b62ae558129f
1 /* Exercise acc_update_device with a NULL data address on nvidia targets. */
3 /* { dg-do run { target openacc_nvidia_accel_selected } } */
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <openacc.h>
9 int
10 main (int argc, char **argv)
12 const int N = 256;
13 int i;
14 unsigned char *h;
15 void *d;
17 h = (unsigned char *) malloc (N);
19 for (i = 0; i < N; i++)
21 h[i] = i;
24 d = acc_copyin (h, N);
25 if (!d)
26 abort ();
28 for (i = 0; i < N; i++)
30 h[i] = 0xab;
33 fprintf (stderr, "CheCKpOInT\n");
34 acc_update_device (0, N);
36 acc_copyout (h, N);
38 for (i = 0; i < N; i++)
40 if (h[i] != 0xab)
41 abort ();
44 free (h);
46 return 0;
49 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
50 /* { dg-output "\\\[\[^\n\r]*,256\\\] is not mapped" } */
51 /* { dg-shouldfail "" } */