ffbdd78a4a
* testsuite/libgomp.oacc-fortran/abort-1.f90: Add 'dg-do run'. * testsuite/libgomp.oacc-fortran/abort-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/lib-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/common-block-1.f90: Use 'stop' not abort(). * testsuite/libgomp.oacc-fortran/common-block-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/common-block-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/data-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/data-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/data-5.f90: Ditto. * testsuite/libgomp.oacc-fortran/dummy-array.f90: Ditto. * testsuite/libgomp.oacc-fortran/gemm-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/gemm.f90: Ditto. * testsuite/libgomp.oacc-fortran/host_data-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/host_data-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/host_data-4.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-independent.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-3.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-4.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-5.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-6.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-7.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Ditto. * testsuite/libgomp.oacc-fortran/lib-12.f90: Ditto. * testsuite/libgomp.oacc-fortran/lib-13.f90: Ditto. * testsuite/libgomp.oacc-fortran/lib-14.f90: Ditto. * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90: Likewise and also add 'dg-do run'. * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90: Ditto. From-SVN: r277503
48 lines
1.1 KiB
Fortran
48 lines
1.1 KiB
Fortran
! { dg-do run }
|
|
! { dg-additional-options "-cpp" }
|
|
!
|
|
! TODO: Have to disable the acc_on_device builtin for we want to test the
|
|
! libgomp library function? The command line option
|
|
! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not for
|
|
! Fortran.
|
|
|
|
use openacc
|
|
implicit none
|
|
|
|
! Host.
|
|
|
|
if (.not. acc_on_device (acc_device_none)) STOP 1
|
|
if (.not. acc_on_device (acc_device_host)) STOP 2
|
|
if (acc_on_device (acc_device_not_host)) STOP 3
|
|
if (acc_on_device (acc_device_nvidia)) STOP 4
|
|
|
|
|
|
! Host via offloading fallback mode.
|
|
|
|
!$acc parallel if(.false.)
|
|
if (.not. acc_on_device (acc_device_none)) STOP 5
|
|
if (.not. acc_on_device (acc_device_host)) STOP 6
|
|
if (acc_on_device (acc_device_not_host)) STOP 7
|
|
if (acc_on_device (acc_device_nvidia)) STOP 8
|
|
!$acc end parallel
|
|
|
|
|
|
#if !ACC_DEVICE_TYPE_host
|
|
|
|
! Offloaded.
|
|
|
|
!$acc parallel
|
|
if (acc_on_device (acc_device_none)) STOP 9
|
|
if (acc_on_device (acc_device_host)) STOP 10
|
|
if (.not. acc_on_device (acc_device_not_host)) STOP 11
|
|
#if ACC_DEVICE_TYPE_nvidia
|
|
if (.not. acc_on_device (acc_device_nvidia)) STOP 12
|
|
#else
|
|
if (acc_on_device (acc_device_nvidia)) STOP 13
|
|
#endif
|
|
!$acc end parallel
|
|
|
|
#endif
|
|
|
|
end
|