1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
3 ! 2.15.3.6 Reduction Clause
11 ! * is allowed for integer, real, and complex
12 ! but not for logical or character
13 ! 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)
18 ! + is allowed for integer, real, and complex
19 ! but not for logical or character
20 ! 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)
25 ! - is deprecated for all types
26 ! 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)
30 ! .and. is only supported for logical operations
31 ! 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)
38 ! .or. is only supported for logical operations
39 ! 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)
46 ! .eqv. is only supported for logical operations
47 ! 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)
54 ! .neqv. is only supported for logical operations
55 ! 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)
62 ! iand only supports integers
63 ! 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)
70 ! ior only supports integers
71 ! 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)
78 ! ieor only supports integers
79 ! 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)
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)
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)
97 end program omp_reduction