brintos

brintos / llvm-project-archived public Read only

0
0
Text · 653 B · 497b824 Raw
39 lines · plain
1! Offloading test checking interaction of allocatables with enter, exit and2! target3! REQUIRES: flang, amdgpu4 5! RUN: %libomptarget-compile-fortran-run-and-check-generic6program main7    integer, allocatable :: A(:)8    allocate(A(10))9 10   !$omp target enter data map(alloc: A)11 12    !$omp target13        do I = 1, 1014            A(I) = I15        end do16    !$omp end target17 18    !$omp target exit data map(from: A)19 20    !$omp target exit data map(delete: A)21 22    do i = 1, 1023        print *, A(i)24    end do25 26    deallocate(A)27end program28 29! CHECK: 130! CHECK: 231! CHECK: 332! CHECK: 433! CHECK: 534! CHECK: 635! CHECK: 736! CHECK: 837! CHECK: 938! CHECK: 1039