[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-parallel-private01.f90
blob504b32250656a5b9295fa1e4ea3e244200ce9c6d
1 !RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 !REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.15.3.3 parallel private Clause
5 program omp_parallel_private
6 integer :: i, j, a(10), b(10), c(10)
7 integer :: k = 10
8 type my_type
9 integer :: array(10)
10 end type my_type
12 type(my_type) :: my_var
14 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a PRIVATE or SHARED clause or on the ALLOCATE directive.
15 !$omp parallel private(my_var%array)
16 do i = 1, 10
17 c(i) = a(i) + b(i) + k
18 my_var%array(i) = k
19 end do
20 !$omp end parallel
21 end program omp_parallel_private