File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
openmp/libomptarget/test/offloading/fortran Expand file tree Collapse file tree 1 file changed +31
-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-run-and-check-generic
10
+ program main
11
+ use omp_lib
12
+ integer :: x(100 )
13
+ integer :: errors = 0
14
+ integer :: i
15
+
16
+ ! $omp target parallel do map(from: x)
17
+ do i = 1 , 100
18
+ x(i) = i
19
+ end do
20
+ ! $omp end target parallel do
21
+ do i = 1 , 100
22
+ if ( x(i) .ne. i ) then
23
+ errors = errors + 1
24
+ end if
25
+ end do
26
+
27
+ print * ," number of errors: " , errors
28
+
29
+ end program main
30
+
31
+ ! CHECK: number of errors: 0
You can’t perform that action at this time.
0 commit comments