File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
openmp/libomptarget/test/offloading/fortran Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ ! Basic offloading test with a target region
2
+ ! REQUIRES: flang
3
+ ! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
4
+ ! UNSUPPORTED: aarch64-unknown-linux-gnu
5
+ ! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
6
+ ! UNSUPPORTED: x86_64-pc-linux-gnu
7
+ ! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
8
+
9
+ ! RUN: %libomptarget-compile-fortran-generic
10
+ ! RUN: env LIBOMPTARGET_INFO=16 %libomptarget-run-generic 2>&1 | %fcheck-generic
11
+ program main
12
+ use omp_lib
13
+ integer :: x(100 )
14
+ integer :: errors = 0
15
+ integer :: i
16
+
17
+ ! $omp target parallel do map(from: x)
18
+ do i = 1 , 100
19
+ x(i) = i
20
+ end do
21
+ ! $omp end target parallel do
22
+ do i = 1 , 100
23
+ if ( x(i) .ne. i ) then
24
+ errors = errors + 1
25
+ end if
26
+ end do
27
+
28
+ print * ," number of errors: " , errors
29
+
30
+ end program main
31
+
32
+ ! CHECK: "PluginInterface" device {{[0-9]+}} info: Launching kernel {{.*}}
33
+ ! CHECKi: number of errors: 0
You can’t perform that action at this time.
0 commit comments