| 1 |
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp |
| 2 |
! OpenMP Version 4.5 |
| 3 |
! 2.15.3.6 Reduction Clause |
| 4 |
program omp_Reduction |
| 5 |
integer :: i |
| 6 |
integer, parameter :: k = 10 |
| 7 |
common /c/ a, b |
| 8 |
|
| 9 |
!ERROR: Variable 'k' on the REDUCTION clause is not definable |
| 10 |
!BECAUSE: 'k' is not a variable |
| 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 |
!BECAUSE: 'c' is not a variable |
| 19 |
!$omp parallel do reduction(*:/c/) |
| 20 |
do i = 1, 10 |
| 21 |
l = k + 1 |
| 22 |
end do |
| 23 |
!$omp end parallel do |
| 24 |
end program omp_Reduction |