34 lines · plain
1! RUN: %flang_fc1 -fdebug-dump-symbols -fopenmp -fopenmp-version=50 %s | FileCheck %s2 3module mm4 implicit none5 type logicalwrapper6 logical b7 end type logicalwrapper8 9contains10!CHECK-LABEL: Subprogram scope: func11 function func(x, n)12 logical func13 integer :: n14 type(logicalwrapper) :: x(n)15 type(logicalwrapper) :: res16 integer :: i17 !$omp declare reduction(.AND.:type(logicalwrapper):omp_out%b=omp_out%b .AND. omp_in%b) initializer(omp_priv%b=.true.)18!CHECK: op.AND: UserReductionDetails TYPE(logicalwrapper)19!CHECK OtherConstruct scope20!CHECK: omp_in size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)21!CHECK: omp_out size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)22!CHECK OtherConstruct scope23!CHECK: omp_orig size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)24!CHECK: omp_priv size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)25 26 !$omp simd reduction(.AND.:res)27 do i=1,n28 res%b=res%b .and. x(i)%b29 enddo30 31 func=res%b32 end function func33end module mm34