libgomp updates.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-11.c
blobeccdb8cbacf057a06e2941181ca6591181064231
1 /* Only nvptx plugin does the required error checking.
2 { dg-do run { target openacc_nvidia_accel_selected } } */
4 #include <stdlib.h>
5 #include <openacc.h>
6 #include <stdint.h>
8 int
9 main (int argc, char **argv)
11 const int N = 512;
12 void *d;
14 d = acc_malloc (N);
15 if (d == NULL)
16 abort ();
18 acc_free ((void *)((uintptr_t) d + (uintptr_t) (N >> 1)));
20 return 0;
23 /* { dg-shouldfail "libgomp: mem free failed 1" } */