1 ! Offloading test checking interaction of an
2 ! enter and exit map of an array of scalars
3 ! with specified bounds
4 ! REQUIRES: flang, amdgpu
6 ! RUN: %libomptarget-compile-fortran-run-and-check-generic
15 !$omp target enter data map(to: array(3:6))
16 ! Shouldn't overwrite data already locked in
17 ! on target via enter, which will then be
18 ! overwritten by our exit
23 ! The compiler/runtime is less lenient about read/write out of
24 ! bounds when using enter and exit, we have to specifically loop
25 ! over the correctly mapped range
28 array(i
) = array(i
) + i
32 !$omp target exit data map(from: array(3:6))
36 !CHECK: 10 10 9 12 15 18 10 10 10 10