b97e78b712
gcc/ * builtins.c (expand_builtin_acc_on_device) [ACCEL_COMPILER]: Emit open-coded sequence. * omp-low.c (oacc_process_reduction_data): Remove handline of GOMP_DEVICE_HOST_NONSHM. gcc/testsuite/ * c-c++-common/goacc/acc_on_device-2.c: Remove XFAIL for C. include/ * gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove. libgomp/ * libgomp-plugin.h (enum offload_target_type): Remove OFFLOAD_TARGET_TYPE_HOST_NONSHM. * openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm. * openacc.h (enum acc_device_t): Likewise. * openacc_lib.h: Likewise. * oacc-init.c (name_of_acc_device_t): Don't handle it. (acc_on_device): Just use __builtin_acc_on_device. * testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage of acc_on_device builtin. * plugin/plugin-host.h: Remove file. * plugin/plugin-host.c: Likewise, but salvage some content into... * oacc-host.c: ... this file. * plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la. * plugin/configfrag.ac (offload_targets): Don't add host_nonshm. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/lib/libgomp.exp (check_effective_target_openacc_host_nonshm_selected): Remove. * testsuite/libgomp.oacc-c++/c++.exp: Don't handle ACC_DEVICE_TYPE=host_nonshm. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise. From-SVN: r226763
65 lines
1.2 KiB
C
65 lines
1.2 KiB
C
/* Disable the acc_on_device builtin; we want to test the libgomp library
|
|
function. */
|
|
/* { dg-additional-options "-fno-builtin-acc_on_device" } */
|
|
|
|
#include <stdlib.h>
|
|
#include <openacc.h>
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
/* Host. */
|
|
|
|
{
|
|
if (!acc_on_device (acc_device_none))
|
|
abort ();
|
|
if (!acc_on_device (acc_device_host))
|
|
abort ();
|
|
if (acc_on_device (acc_device_not_host))
|
|
abort ();
|
|
if (acc_on_device (acc_device_nvidia))
|
|
abort ();
|
|
}
|
|
|
|
|
|
/* Host via offloading fallback mode. */
|
|
|
|
#pragma acc parallel if(0)
|
|
{
|
|
if (!acc_on_device (acc_device_none))
|
|
abort ();
|
|
if (!acc_on_device (acc_device_host))
|
|
abort ();
|
|
if (acc_on_device (acc_device_not_host))
|
|
abort ();
|
|
if (acc_on_device (acc_device_nvidia))
|
|
abort ();
|
|
}
|
|
|
|
|
|
#if !ACC_DEVICE_TYPE_host
|
|
|
|
/* Offloaded. */
|
|
|
|
#pragma acc parallel
|
|
{
|
|
if (acc_on_device (acc_device_none))
|
|
abort ();
|
|
if (acc_on_device (acc_device_host))
|
|
abort ();
|
|
if (!acc_on_device (acc_device_not_host))
|
|
abort ();
|
|
#if ACC_DEVICE_TYPE_nvidia
|
|
if (!acc_on_device (acc_device_nvidia))
|
|
abort ();
|
|
#else
|
|
if (acc_on_device (acc_device_nvidia))
|
|
abort ();
|
|
#endif
|
|
}
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
}
|