40 lines · plain
1! Offloading test checking interaction of a two 1-D allocatable arrays with a2! target region while providing the map upper and lower bounds3! REQUIRES: flang, amdgpu4 5! RUN: %libomptarget-compile-fortran-run-and-check-generic6program main7 integer, allocatable :: sp_read(:), sp_write(:)8 allocate(sp_read(10))9 allocate(sp_write(10))10 11 do i = 1, 1012 sp_read(i) = i13 sp_write(i) = 014 end do15 16 !$omp target map(tofrom:sp_read(2:6)) map(tofrom:sp_write(2:6))17 do i = 1, 1018 sp_write(i) = sp_read(i)19 end do20 !$omp end target21 22 do i = 1, 1023 print *, sp_write(i)24 end do25 26 deallocate(sp_read)27 deallocate(sp_write)28end program29 30! CHECK: 031! CHECK: 232! CHECK: 333! CHECK: 434! CHECK: 535! CHECK: 636! CHECK: 037! CHECK: 038! CHECK: 039! CHECK: 040