35 lines · plain
1! This checks that the basic functionality of setting the implicit mapping2! behaviour of a target region to present incurs the present behaviour for3! the implicit map capture.4! REQUIRES: flang, amdgpu5! RUN: %libomptarget-compile-fortran-generic6! RUN: %libomptarget-run-fail-generic 2>&1 \7! RUN: | %fcheck-generic8 9! NOTE: This should intentionally fatal error in omptarget as it's not10! present, as is intended.11subroutine target_data_not_present()12 implicit none13 double precision, dimension(:), allocatable :: arr14 integer, parameter :: N = 1615 integer :: i16 17 allocate(arr(N))18 19!$omp target defaultmap(present: allocatable)20 do i = 1,N21 arr(i) = 42.0d022 end do23!$omp end target24 25 deallocate(arr)26 return27end subroutine28 29program map_present30 implicit none31 call target_data_not_present()32end program33 34!CHECK: omptarget message: device mapping required by 'present' map type modifier does not exist for host address{{.*}}35