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
5program omp_Reduction
6  integer :: i
7  integer, parameter :: k = 10
8  common /c/ a, b
9
10  !ERROR: Variable 'k' on the REDUCTION clause is not definable
11  !$omp parallel do reduction(+:k)
12  do i = 1, 10
13    l = k + 1
14  end do
15  !$omp end parallel do
16
17  !ERROR: Variable 'c' on the REDUCTION clause is not definable
18  !$omp parallel do reduction(-:/c/)
19  do i = 1, 10
20    l = k + 1
21  end do
22  !$omp end parallel do
23end program omp_Reduction
24