64 lines · plain
1! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp2! OpenMP Version 4.53! 2.15.3.6 Reduction Clause Positive cases4 5!DEF: /OMP_REDUCTION MainProgram6program OMP_REDUCTION7 !DEF: /OMP_REDUCTION/i ObjectEntity INTEGER(4)8 integer i9 !DEF: /OMP_REDUCTION/k ObjectEntity INTEGER(4)10 integer :: k = 1011 !DEF: /OMP_REDUCTION/m ObjectEntity INTEGER(4)12 integer :: m = 1213 !$omp parallel do reduction(max:k)14 !DEF: /OMP_REDUCTION/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)15 do i=1,1016 !DEF: /OMP_REDUCTION/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)17 !DEF: /OMP_REDUCTION/max ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity18 !DEF: /OMP_REDUCTION/OtherConstruct1/m (OmpShared) HostAssoc INTEGER(4)19 k = max(k, m)20 end do21 !$omp end parallel do22 23 !$omp parallel do reduction(min:k)24 !DEF: /OMP_REDUCTION/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)25 do i=1,1026 !DEF: /OMP_REDUCTION/OtherConstruct2/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)27 !DEF: /OMP_REDUCTION/min ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity28 !DEF: /OMP_REDUCTION/OtherConstruct2/m (OmpShared) HostAssoc INTEGER(4)29 k = min(k, m)30 end do31 !$omp end parallel do32 33 !$omp parallel do reduction(iand:k)34 !DEF: /OMP_REDUCTION/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)35 do i=1,1036 !DEF: /OMP_REDUCTION/OtherConstruct3/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)37 !DEF: /OMP_REDUCTION/iand ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity38 !DEF: /OMP_REDUCTION/OtherConstruct3/m (OmpShared) HostAssoc INTEGER(4)39 k = iand(k, m)40 end do41 !$omp end parallel do42 43 !$omp parallel do reduction(ior:k)44 !DEF: /OMP_REDUCTION/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)45 do i=1,1046 !DEF: /OMP_REDUCTION/OtherConstruct4/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)47 !DEF: /OMP_REDUCTION/ior ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity48 !DEF: /OMP_REDUCTION/OtherConstruct4/m (OmpShared) HostAssoc INTEGER(4)49 k = ior(k, m)50 end do51 !$omp end parallel do52 53 !$omp parallel do reduction(ieor:k)54 !DEF: /OMP_REDUCTION/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)55 do i=1,1056 !DEF: /OMP_REDUCTION/OtherConstruct5/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)57 !DEF: /OMP_REDUCTION/ieor ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity58 !DEF: /OMP_REDUCTION/OtherConstruct5/m (OmpShared) HostAssoc INTEGER(4)59 k = ieor(k,m)60 end do61 !$omp end parallel do62 63end program OMP_REDUCTION64