c68ddd5e2a
libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Enable for all but '-DACC_MEM_SHARED=0'. * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Add 'acc_device_radeon' testing. * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Enable for all. * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Improve checking for non-'openacc_nvidia_accel_selected'. * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Clarify that "Not all implement this checking". * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
63 lines
960 B
C
63 lines
960 B
C
/* Check acc_is_present and acc_delete. */
|
|
|
|
/* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
|
|
|
|
#include <stdlib.h>
|
|
#include <openacc.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
const int N = 256;
|
|
int i;
|
|
unsigned char *h;
|
|
void *d;
|
|
|
|
h = (unsigned char *) malloc (N);
|
|
|
|
for (i = 0; i < N; i++)
|
|
{
|
|
h[i] = i;
|
|
}
|
|
|
|
d = acc_copyin (h, N);
|
|
|
|
if (acc_is_present (h, 1) != 1)
|
|
abort ();
|
|
|
|
if (acc_is_present (h, N + 1) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h + 1, N) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h - 1, N) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h - 1, N - 1) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h + N, 0) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h + N, N) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (0, N) != 0)
|
|
abort ();
|
|
|
|
if (acc_is_present (h, 0) != 0)
|
|
abort ();
|
|
|
|
acc_delete (h, N);
|
|
|
|
if (acc_is_present (h, 1) != 0)
|
|
abort ();
|
|
|
|
free (h);
|
|
|
|
return 0;
|
|
}
|