[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-copyin03.f90
blob2d856c769feb1fe534722ca6e578df596e338bad
1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 ! REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.15.4.1 copyin Clause
5 ! A list item that appears in a copyin clause must be threadprivate.
6 ! Named variables appearing in a threadprivate common block may be specified
7 ! It is not necessary to specify the whole common block.
9 program omp_copyin
11 integer :: a(10), b(10)
12 common /cmn/ j, k
14 !$omp threadprivate(/cmn/)
16 j = 20
17 k = 10
19 !$omp parallel copyin(/cmn/)
20 a(:5) = k
21 b(:5) = j
22 !$omp end parallel
24 j = j + k
25 k = k * j
27 !$omp parallel copyin(j, k)
28 a(6:) = j
29 b(6:) = k
30 !$omp end parallel
32 print *, a, b
34 end program omp_copyin