31 lines · plain
1! Test `declare target to` interaction with an allocatable with a non-default2! range3! REQUIRES: flang, amdgpu4 5! RUN: %libomptarget-compile-fortran-run-and-check-generic6module test_07 real(4), allocatable :: zero_off(:)8 !$omp declare target(zero_off)9end module test_010 11program main12 use test_013 implicit none14 15 allocate(zero_off(0:10))16 17 zero_off(0) = 30.018 zero_off(1) = 40.019 zero_off(10) = 25.020 21 !$omp target map(tofrom: zero_off)22 zero_off(0) = zero_off(1)23 !$omp end target24 25 print *, zero_off(0)26 print *, zero_off(1)27end program28 29! CHECK: 40.30! CHECK: 40.31