[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-reduction03.f90
blob0019d44fc1e185d7f1536e21e2c72e217732ebad
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1 -fopenmp
2 ! REQUIRES: shell
3 ! OpenMP Version 4.5
4 ! 2.15.3.6 Reduction Clause
6 subroutine omp_target(p)
7 integer, pointer, intent(in) :: p
9 integer :: i
10 integer :: k = 10
12 !ERROR: Pointer 'p' with the INTENT(IN) attribute may not appear in a REDUCTION clause
13 !$omp parallel do reduction(+:p)
14 do i = 1, 10
15 k= k + 1
16 end do
17 !$omp end parallel do
19 end subroutine omp_target