brintos

brintos / llvm-project-archived public Read only

0
0
Text · 560 B · 276725d Raw
25 lines · plain
1! Offloading test with a target region mapping a null-ary (no target or2! allocated data) to device, and then setting the target on device before3! printing the changed target on host.4! REQUIRES: flang, amdgpu5 6! RUN: %libomptarget-compile-fortran-run-and-check-generic7program main8    implicit none9    integer,    pointer :: Set10    integer,    target, allocatable :: Set_Target11 12    allocate(Set_Target)13 14    Set_Target = 3015 16!$omp target map(Set)17    Set => Set_Target18    Set = 4519!$omp end target20 21    print *, Set_Target22end program main23 24! CHECK: 4525