Files
clang-p2996/offload/test/offloading/fortran/target_map_common_block2.f90
Ethan Luis McDonough 8823448807 [Offload] Refactor offload test requirements (#95196)
Many tests in the `offload` project have requirements defined by which
targets are not supported rather than which platforms are supported.
This patch aims to streamline the requirement definitions by adding four
new feature tags: `host`, `gpu`, `amdgpu`, and `nvidiagpu`.
2024-06-29 00:56:18 -05:00

20 lines
397 B
Fortran

! REQUIRES: flang, amdgpu
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
use omp_lib
integer :: tmp, var4
common var4
var4 = 24
tmp = 12
print *, "var4 before target =", var4
!$omp target map(tofrom:var4)
var4 = tmp
!$omp end target
print *, "var4 after target =", var4
end program
! CHECK: var4 before target = 24
! CHECK: var4 after target = 12