brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.2 KiB · 7d3f8d4 Raw
98 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2! OpenMP Version 4.53! 2.15.3.6 Reduction Clause4program omp_reduction5  integer :: i6  real :: r7  character :: c8  complex :: z9  logical :: l10 11  ! * is allowed for integer, real, and complex12  ! but not for logical or character13  ! ERROR: The type of 'c' is incompatible with the reduction operator.14  ! ERROR: The type of 'l' is incompatible with the reduction operator.15  !$omp parallel reduction(*:i,r,c,z,l)16  !$omp end parallel17 18  ! + is allowed for integer, real, and complex19  ! but not for logical or character20  ! ERROR: The type of 'c' is incompatible with the reduction operator.21  ! ERROR: The type of 'l' is incompatible with the reduction operator.22  !$omp parallel reduction(+:i,r,c,z,l)23  !$omp end parallel24 25  ! - is deprecated for all types26  ! ERROR: The minus reduction operator is deprecated since OpenMP 5.2 and is not supported in the REDUCTION clause.27  !$omp parallel reduction(-:i,r,c,z,l)28  !$omp end parallel29 30  ! .and. is only supported for logical operations31  ! ERROR: The type of 'i' is incompatible with the reduction operator.32  ! ERROR: The type of 'r' is incompatible with the reduction operator.33  ! ERROR: The type of 'c' is incompatible with the reduction operator.34  ! ERROR: The type of 'z' is incompatible with the reduction operator.35  !$omp parallel reduction(.and.:i,r,c,z,l)36  !$omp end parallel37 38  ! .or. is only supported for logical operations39  ! ERROR: The type of 'i' is incompatible with the reduction operator.40  ! ERROR: The type of 'r' is incompatible with the reduction operator.41  ! ERROR: The type of 'c' is incompatible with the reduction operator.42  ! ERROR: The type of 'z' is incompatible with the reduction operator.43  !$omp parallel reduction(.or.:i,r,c,z,l)44  !$omp end parallel45 46  ! .eqv. is only supported for logical operations47  ! ERROR: The type of 'i' is incompatible with the reduction operator.48  ! ERROR: The type of 'r' is incompatible with the reduction operator.49  ! ERROR: The type of 'c' is incompatible with the reduction operator.50  ! ERROR: The type of 'z' is incompatible with the reduction operator.51  !$omp parallel reduction(.eqv.:i,r,c,z,l)52  !$omp end parallel53 54  ! .neqv. is only supported for logical operations55  ! ERROR: The type of 'i' is incompatible with the reduction operator.56  ! ERROR: The type of 'r' is incompatible with the reduction operator.57  ! ERROR: The type of 'c' is incompatible with the reduction operator.58  ! ERROR: The type of 'z' is incompatible with the reduction operator.59  !$omp parallel reduction(.neqv.:i,r,c,z,l)60  !$omp end parallel61 62  ! iand only supports integers63  ! ERROR: The type of 'r' is incompatible with the reduction operator.64  ! ERROR: The type of 'c' is incompatible with the reduction operator.65  ! ERROR: The type of 'z' is incompatible with the reduction operator.66  ! ERROR: The type of 'l' is incompatible with the reduction operator.67  !$omp parallel reduction(iand:i,r,c,z,l)68  !$omp end parallel69 70  ! ior only supports integers71  ! ERROR: The type of 'r' is incompatible with the reduction operator.72  ! ERROR: The type of 'c' is incompatible with the reduction operator.73  ! ERROR: The type of 'z' is incompatible with the reduction operator.74  ! ERROR: The type of 'l' is incompatible with the reduction operator.75  !$omp parallel reduction(ior:i,r,c,z,l)76  !$omp end parallel77 78  ! ieor only supports integers79  ! ERROR: The type of 'r' is incompatible with the reduction operator.80  ! ERROR: The type of 'c' is incompatible with the reduction operator.81  ! ERROR: The type of 'z' is incompatible with the reduction operator.82  ! ERROR: The type of 'l' is incompatible with the reduction operator.83  !$omp parallel reduction(ieor:i,r,c,z,l)84  !$omp end parallel85 86  ! max arguments may be integer, real, or character:87  ! ERROR: The type of 'z' is incompatible with the reduction operator.88  ! ERROR: The type of 'l' is incompatible with the reduction operator.89  !$omp parallel reduction(max:i,r,c,z,l)90  !$omp end parallel91 92  ! min arguments may be integer, real, or character:93  ! ERROR: The type of 'z' is incompatible with the reduction operator.94  ! ERROR: The type of 'l' is incompatible with the reduction operator.95  !$omp parallel reduction(min:i,r,c,z,l)96  !$omp end parallel97end program omp_reduction98