llvm-project/flang/test/Lower/OpenMP/parallel-wsloop-reduction-byref.f90
Kiran Kumar T P dc343d2f05
[NFC][flang] Replace use of flang -fc1 with %flang_fc1 in few test case (#168830)
Replace use of flang -fc1 with %flang_fc1 in few test case
2025-11-20 15:00:15 +05:30

17 lines
493 B
Fortran

! 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_fc1 -fopenmp -mmlir --force-byref-reduction -emit-hlfir %s -o - | FileCheck %s
! CHECK: omp.parallel {
! CHECK: omp.wsloop private({{.*}}) 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