blob: 32caac39778dee101c14b1286f6b7b40fc37fe55 [file] [log] [blame]
! Check that for parallel do, reduction is only processed for the loop
! RUN: bbc -fopenmp --force-byref-reduction -emit-hlfir %s -o - | FileCheck %s
! RUN: flang-new -fc1 -fopenmp -mmlir --force-byref-reduction -emit-hlfir %s -o - | FileCheck %s
! CHECK: omp.parallel {
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_i32
subroutine sb
integer :: x
x = 0
!$omp parallel do reduction(+:x)
do i=1,100
x = x + 1
end do
!$omp end parallel do
end subroutine