54 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2 3! Types for built in reductions must have types which are valid for the4! initialization and combiner expressions in the spec. This implies assumed5! rank and assumed size cannot be used.6 7subroutine assumedRank1(a)8 integer :: a(..)9 10 ! ERROR: The type of 'a' is incompatible with the reduction operator.11 !$omp parallel reduction(+:a)12 !$omp end parallel13end14 15subroutine assumedRank2(a)16 integer :: a(..)17 18 ! ERROR: The type of 'a' is incompatible with the reduction operator.19 !$omp parallel reduction(min:a)20 !$omp end parallel21end22 23subroutine assumedRank3(a)24 integer :: a(..)25 26 ! ERROR: The type of 'a' is incompatible with the reduction operator.27 !$omp parallel reduction(iand:a)28 !$omp end parallel29end30 31subroutine assumedSize1(a)32 integer :: a(*)33 34 ! ERROR: Whole assumed-size array 'a' may not appear here without subscripts35 !$omp parallel reduction(+:a)36 !$omp end parallel37end38 39subroutine assumedSize2(a)40 integer :: a(*)41 42 ! ERROR: Whole assumed-size array 'a' may not appear here without subscripts43 !$omp parallel reduction(max:a)44 !$omp end parallel45end46 47subroutine assumedSize3(a)48 integer :: a(*)49 50 ! ERROR: Whole assumed-size array 'a' may not appear here without subscripts51 !$omp parallel reduction(ior:a)52 !$omp end parallel53end54