[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-reduction04.f90
blob0a8a306235857a131f205dd00c20d33eb8cdc4ef
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
9 !ERROR: Variable 'k' on the REDUCTION clause is not definable
10 !$omp parallel do reduction(+:k)
11 do i = 1, 10
12 l = k + 1
13 end do
14 !$omp end parallel do
16 !ERROR: Variable 'c' on the REDUCTION clause is not definable
17 !$omp parallel do reduction(-:/c/)
18 do i = 1, 10
19 l = k + 1
20 end do
21 !$omp end parallel do
22 end program omp_Reduction