gcc/libgomp/testsuite/libgomp.fortran/examples-4/device-3.f90
Tobias Burnus c425e66b27 libgomp/testsuite – use 'stop'
libgomp/
	* testsuite/libgomp.fortran/: Replace 'STOP' by 'stop'.

From-SVN: r277609
2019-10-30 12:44:54 +01:00

22 lines
565 B
Fortran

! { dg-do run }
! { dg-require-effective-target offload_device }
program e_57_3
use omp_lib, only: omp_is_initial_device, omp_get_num_devices,&
omp_get_default_device, omp_set_default_device
logical :: res
integer :: default_device
default_device = omp_get_default_device ()
!$omp target map(from: res)
res = omp_is_initial_device ()
!$omp end target
if (res) stop 1
call omp_set_default_device (omp_get_num_devices ())
!$omp target map(from: res)
res = omp_is_initial_device ()
!$omp end target
if (.not. res) stop 2
end program