20 lines · plain
1! Basic offloading test with a target region that checks constant indexing on2! device correctly works (regression test for prior bug).3! REQUIRES: flang, amdgpu4 5! RUN: %libomptarget-compile-fortran-run-and-check-generic6program main7 INTEGER :: sp(10) = (/0,0,0,0,0,0,0,0,0,0/)8 9 !$omp target map(tofrom:sp)10 sp(1) = 2011 sp(5) = 1012 !$omp end target13 14 print *, sp(1)15 print *, sp(5)16end program17 18! CHECK: 2019! CHECK: 1020