[RISCV] Simplify MIPS CCMov patterns. NFC (#125318)
[llvm-project.git] / offload / test / offloading / fortran / target-map-enter-exit-allocatables.f90
blob497b824b4fc72e400b5afb6b630ea69a03849568
1 ! Offloading test checking interaction of allocatables with enter, exit and
2 ! target
3 ! REQUIRES: flang, amdgpu
5 ! RUN: %libomptarget-compile-fortran-run-and-check-generic
6 program main
7 integer, allocatable :: A(:)
8 allocate(A(10))
10 !$omp target enter data map(alloc: A)
12 !$omp target
13 do I = 1, 10
14 A(I) = I
15 end do
16 !$omp end target
18 !$omp target exit data map(from: A)
20 !$omp target exit data map(delete: A)
22 do i = 1, 10
23 print *, A(i)
24 end do
26 deallocate(A)
27 end program
29 ! CHECK: 1
30 ! CHECK: 2
31 ! CHECK: 3
32 ! CHECK: 4
33 ! CHECK: 5
34 ! CHECK: 6
35 ! CHECK: 7
36 ! CHECK: 8
37 ! CHECK: 9
38 ! CHECK: 10