* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-34.c
bloba24916d13066c63a63ac249adb721d0b75de9372
1 /* Exercise an invalid acc_present_or_create 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 unsigned char *h;
14 void *d1, *d2;
16 h = (unsigned char *) malloc (N);
18 d1 = acc_present_or_create (h, N);
19 if (!d1)
20 abort ();
22 fprintf (stderr, "CheCKpOInT\n");
23 d2 = acc_present_or_create (h + 2, N);
24 if (!d2)
25 abort ();
27 if (d1 != d2)
28 abort ();
30 acc_delete (h, N);
32 free (h);
34 return 0;
37 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
38 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,\\\+256\\\] not mapped" } */
39 /* { dg-shouldfail "" } */