This PR is one in a series of 3 that aim to add support for explicit member mapping of allocatable components in derived types within OpenMP+Fortran for Flang. This PR provides all of the runtime tests that are currently upstreamable, unfortunately some of the other tests would require linking of the fortran runtime for offload which we currently do not do. But regardless, this is plenty to ensure that the mapping is working in most cases.
21 lines
424 B
Fortran
21 lines
424 B
Fortran
! Basic offloading test of a regular array explicitly passed within a target
|
|
! region
|
|
! REQUIRES: flang, amdgpu
|
|
|
|
! RUN: %libomptarget-compile-fortran-run-and-check-generic
|
|
program main
|
|
integer :: x(10) = (/0,0,0,0,0,0,0,0,0,0/)
|
|
integer :: i = 1
|
|
integer :: j = 11
|
|
|
|
!$omp target
|
|
do i = 1, j
|
|
x(i) = i;
|
|
end do
|
|
!$omp end target
|
|
|
|
PRINT *, x(:)
|
|
end program main
|
|
|
|
! CHECK: 1 2 3 4 5 6 7 8 9 10
|