Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / offloading / fortran / target-map-pointer-target-array-section-3d-bounds.f90
blob2b2c60f5d4b50e45a12430808e09e47157288df8
1 ! Offloading test checking interaction of pointer
2 ! and target with target where 3-D bounds have
3 ! been specified
4 ! REQUIRES: flang, amdgpu
6 ! RUN: %libomptarget-compile-fortran-run-and-check-generic
7 program main
8 integer, pointer :: inArray(:,:,:)
9 integer, pointer :: outArray(:,:,:)
10 integer, target :: in(3,3,3)
11 integer, target :: out(3,3,3)
13 inArray => in
14 outArray => out
16 do i = 1, 3
17 do j = 1, 3
18 do k = 1, 3
19 inArray(i, j, k) = 42
20 outArray(i, j, k) = 0
21 end do
22 end do
23 end do
25 !$omp target map(tofrom:inArray(1:3, 1:3, 2:2), outArray(1:3, 1:3, 1:3))
26 do j = 1, 3
27 do k = 1, 3
28 outArray(k, j, 2) = inArray(k, j, 2)
29 end do
30 end do
31 !$omp end target
33 print *, outArray
35 end program
37 ! CHECK: 0 0 0 0 0 0 0 0 0 42 42 42 42 42 42 42 42 42 0 0 0 0 0 0 0 0 0