26 lines · plain
1! Offloading test checking interaction of an enter and exit map of an scalar2! REQUIRES: flang, amdgpu3 4! RUN: %libomptarget-compile-fortran-run-and-check-generic5program main6 integer :: scalar7 scalar = 108 9 !$omp target enter data map(to: scalar)10 !ignored, as we've already attached11 scalar = 2012 13 !$omp target14 scalar = scalar + 5015 !$omp end target16 17 !$omp target exit data map(from: scalar)18 19 ! not the answer one may expect, but it is the same20 ! answer Clang gives so we are correctly on par with21 ! Clang for the moment.22 print *, scalar23end program24 25!CHECK: 1026