25 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s | FileCheck %s2 3! Check that logical reductions of different kinds do not end up using the same4! reduction declaration5 6! CHECK-LABEL: omp.declare_reduction @or_reduction_l64 : !fir.logical<8> init {7! CHECK-LABEL: omp.declare_reduction @or_reduction_l32 : !fir.logical<4> init {8 9subroutine test(a4, a8, sz)10 integer :: sz11 logical(4), dimension(sz) :: a412 logical(8), dimension(sz) :: a813 14 logical(4) :: res4 = .false.15 logical(8) :: res8 = .false.16 integer i17 18! CHECK: omp.wsloop private({{.*}}) reduction(@or_reduction_l32 {{.*}}, @or_reduction_l64 {{.*}}) {19 !$omp do reduction(.or.:res4, res8)20 do i = 1,sz21 res4 = res4 .or. a4(i)22 res8 = res8 .or. a8(i)23 enddo24end subroutine25