brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 2a1e9b1 Raw
30 lines · plain
1! Basic test that checks that when ompx_hold is in use we cannot delete the data2! until the ompx_hold falls out of scope, and verifies this via the utilisation of3! present.4! REQUIRES: flang, amdgpu5! RUN: %libomptarget-compile-fortran-generic6! RUN: %libomptarget-run-fail-generic 2>&1 \7! RUN: | %fcheck-generic8 9program ompx_hold10    implicit none11    integer :: presence_check12 13!CHECK-NOT: omptarget message: device mapping required by 'present' map type modifier does not exist for host address{{.*}}14!$omp target data map(ompx_hold, tofrom: presence_check)15!$omp target exit data map(delete: presence_check)16!$omp target map(present, tofrom: presence_check)17    presence_check = 1018!$omp end target19!$omp end target data20 21!CHECK: omptarget message: device mapping required by 'present' map type modifier does not exist for host address{{.*}}22!$omp target data map(tofrom: presence_check)23!$omp target exit data map(delete: presence_check)24!$omp target map(present, tofrom: presence_check)25presence_check = 2026!$omp end target27!$omp end target data28 29end program30