xref: /llvm-project/flang/test/Lower/OpenMP/parallel-wsloop-reduction.f90 (revision 937cbce14c9aa956342a9c818c26a8a557802843)
1! Check that for parallel do, reduction is only processed for the loop
2
3! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
4! RUN: flang -fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s
5
6! CHECK: omp.parallel {
7! CHECK: omp.wsloop reduction(@add_reduction_i32
8subroutine sb
9  integer :: x
10  x = 0
11  !$omp parallel do reduction(+:x)
12  do i=1,100
13    x = x + 1
14  end do
15  !$omp end parallel do
16end subroutine
17