[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-copyin04.f90
blob297d42ab3cffb28d803b2cf051cd4e2c7af09b6b
1 ! RUN: %python %S/test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.4.1 copyin Clause
4 ! A list item that appears in a copyin clause must be threadprivate
6 program omp_copyin
8 integer :: i
9 integer, save :: j, k
10 integer :: a(10), b(10)
12 !$omp threadprivate(j, k)
14 j = 20
15 k = 10
17 !$omp parallel do copyin(j, k)
18 do i = 1, 10
19 a(i) = k + i
20 b(i) = j + i
21 end do
22 !$omp end parallel do
24 print *, a, b
26 end program omp_copyin