blob: f819f1f0d994dfce0c3d7ce47b16c60ea3c34e1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
! Basic offloading test with a target region that checks constant indexing on
! device correctly works (regression test for prior bug).
! REQUIRES: flang, amdgpu
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
INTEGER :: sp(10) = (/0,0,0,0,0,0,0,0,0,0/)
!$omp target map(tofrom:sp)
sp(1) = 20
sp(5) = 10
!$omp end target
print *, sp(1)
print *, sp(5)
end program
! CHECK: 20
! CHECK: 10
|