Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-11.c

28 lines
552 B
C
Raw Normal View History

2015-08-28 15:33:40 +00:00
/* Only nvptx plugin does the required error checking.
{ dg-do run { target openacc_nvidia_accel_selected } } */
2017-04-10 11:32:00 +00:00
#include <stdio.h>
2015-08-28 15:33:40 +00:00
#include <stdlib.h>
#include <openacc.h>
#include <stdint.h>
int
main (int argc, char **argv)
{
const int N = 512;
void *d;
d = acc_malloc (N);
if (d == NULL)
abort ();
2017-04-10 11:32:00 +00:00
fprintf (stderr, "CheCKpOInT\n");
2015-08-28 15:33:40 +00:00
acc_free ((void *)((uintptr_t) d + (uintptr_t) (N >> 1)));
return 0;
}
2017-04-10 11:32:00 +00:00
/* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
/* { dg-output "invalid device address" } */
/* { dg-shouldfail "" } */