blob: 7e252259007fe80c1a6ae04762ca61bc0f1ae1ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
! Offloading test checking interaction of an enter and exit map of an scalar
! REQUIRES: flang, amdgpu
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
integer :: scalar
scalar = 10
!$omp target enter data map(to: scalar)
!ignored, as we've already attached
scalar = 20
!$omp target
scalar = scalar + 50
!$omp end target
!$omp target exit data map(from: scalar)
! not the answer one may expect, but it is the same
! answer Clang gives so we are correctly on par with
! Clang for the moment.
print *, scalar
end program
!CHECK: 10
|