Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/reduction.f95

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fmax-errors=0" }
3
4 subroutine foo (ia1)
5 integer :: i1, i2, i3
6 integer, dimension (*) :: ia1
7 integer, dimension (10) :: ia2
8 real :: r1
9 real, dimension (5) :: ra1
10 double precision :: d1
11 double precision, dimension (4) :: da1
12 complex :: c1
13 complex, dimension (7) :: ca1
14 logical :: l1
15 logical, dimension (3) :: la1
16 character (5) :: a1
17 type t
18 integer :: i
19 end type
20 type(t) :: t1
21 type(t), dimension (2) :: ta1
22 real, pointer :: p1 => NULL()
23 integer, allocatable :: aa1 (:,:)
24 save i2
25 common /blk/ i1
26
27 !$acc parallel reduction (+:ia2)
28 ! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 }
29 !$acc end parallel
30 !$acc parallel reduction (+:ra1)
31 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
32 !$acc end parallel
33 !$acc parallel reduction (+:ca1)
34 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
35 !$acc end parallel
36 !$acc parallel reduction (+:da1)
37 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
38 !$acc end parallel
39 !$acc parallel reduction (.and.:la1)
40 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
41 !$acc end parallel
42 !$acc parallel reduction (+:i3, r1, d1, c1)
43 !$acc end parallel
44 !$acc parallel reduction (*:i3, r1, d1, c1)
45 !$acc end parallel
46 !$acc parallel reduction (-:i3, r1, d1, c1)
47 !$acc end parallel
48 !$acc parallel reduction (.and.:l1)
49 !$acc end parallel
50 !$acc parallel reduction (.or.:l1)
51 !$acc end parallel
52 !$acc parallel reduction (.eqv.:l1)
53 !$acc end parallel
54 !$acc parallel reduction (.neqv.:l1)
55 !$acc end parallel
56 !$acc parallel reduction (min:i3, r1, d1)
57 !$acc end parallel
58 !$acc parallel reduction (max:i3, r1, d1)
59 !$acc end parallel
60 !$acc parallel reduction (iand:i3)
61 !$acc end parallel
62 !$acc parallel reduction (ior:i3)
63 !$acc end parallel
64 !$acc parallel reduction (ieor:i3)
65 !$acc end parallel
66 !$acc parallel reduction (+:/blk/) ! { dg-error "Syntax error" }
67 !$acc end parallel ! { dg-error "Unexpected" }
68 !$acc parallel reduction (*:p1) ! { dg-error "POINTER object" }
69 !$acc end parallel
70 !$acc parallel reduction (-:aa1)
71 ! { dg-error "Array 'aa1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
72 !$acc end parallel
73 !$acc parallel reduction (*:ia1) ! { dg-error "Assumed size" }
74 ! { dg-error "Array 'ia1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
75 !$acc end parallel
76 !$acc parallel reduction (+:l1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type LOGICAL" }
77 !$acc end parallel
78 !$acc parallel reduction (*:la1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type LOGICAL" }
79 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
80 !$acc end parallel
81 !$acc parallel reduction (-:a1) ! { dg-error "OMP DECLARE REDUCTION - not found for type CHARACTER" }
82 !$acc end parallel
83 !$acc parallel reduction (+:t1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type TYPE" }
84 !$acc end parallel
85 !$acc parallel reduction (*:ta1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type TYPE" }
86 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
87 !$acc end parallel
88 !$acc parallel reduction (.and.:i3) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type INTEGER" }
89 !$acc end parallel
90 !$acc parallel reduction (.or.:ia2) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type INTEGER" }
91 ! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 }
92 !$acc end parallel
93 !$acc parallel reduction (.eqv.:r1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type REAL" }
94 !$acc end parallel
95 !$acc parallel reduction (.neqv.:ra1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type REAL" }
96 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
97 !$acc end parallel
98 !$acc parallel reduction (.and.:d1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type REAL" }
99 !$acc end parallel
100 !$acc parallel reduction (.or.:da1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type REAL" }
101 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
102 !$acc end parallel
103 !$acc parallel reduction (.eqv.:c1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type COMPLEX" }
104 !$acc end parallel
105 !$acc parallel reduction (.neqv.:ca1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type COMPLEX" }
106 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
107 !$acc end parallel
108 !$acc parallel reduction (.and.:a1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type CHARACTER" }
109 !$acc end parallel
110 !$acc parallel reduction (.or.:t1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type TYPE" }
111 !$acc end parallel
112 !$acc parallel reduction (.eqv.:ta1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type TYPE" }
113 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
114 !$acc end parallel
115 !$acc parallel reduction (min:c1) ! { dg-error "OMP DECLARE REDUCTION min not found for type COMPLEX" }
116 !$acc end parallel
117 !$acc parallel reduction (max:ca1) ! { dg-error "OMP DECLARE REDUCTION max not found for type COMPLEX" }
118 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
119 !$acc end parallel
120 !$acc parallel reduction (max:l1) ! { dg-error "OMP DECLARE REDUCTION max not found for type LOGICAL" }
121 !$acc end parallel
122 !$acc parallel reduction (min:la1) ! { dg-error "OMP DECLARE REDUCTION min not found for type LOGICAL" }
123 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
124 !$acc end parallel
125 !$acc parallel reduction (max:a1) ! { dg-error "OMP DECLARE REDUCTION max not found for type CHARACTER" }
126 !$acc end parallel
127 !$acc parallel reduction (min:t1) ! { dg-error "OMP DECLARE REDUCTION min not found for type TYPE" }
128 !$acc end parallel
129 !$acc parallel reduction (max:ta1) ! { dg-error "OMP DECLARE REDUCTION max not found for type TYPE" }
130 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
131 !$acc end parallel
132 !$acc parallel reduction (iand:r1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type REAL" }
133 !$acc end parallel
134 !$acc parallel reduction (ior:ra1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" }
135 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
136 !$acc end parallel
137 !$acc parallel reduction (ieor:d1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type REAL" }
138 !$acc end parallel
139 !$acc parallel reduction (ior:da1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" }
140 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
141 !$acc end parallel
142 !$acc parallel reduction (iand:c1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type COMPLEX" }
143 !$acc end parallel
144 !$acc parallel reduction (ior:ca1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type COMPLEX" }
145 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
146 !$acc end parallel
147 !$acc parallel reduction (ieor:l1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type LOGICAL" }
148 !$acc end parallel
149 !$acc parallel reduction (iand:la1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type LOGICAL" }
150 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
151 !$acc end parallel
152 !$acc parallel reduction (ior:a1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type CHARACTER" }
153 !$acc end parallel
154 !$acc parallel reduction (ieor:t1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type TYPE" }
155 !$acc end parallel
156 !$acc parallel reduction (iand:ta1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type TYPE" }
157 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
158 !$acc end parallel
159
160 !$acc serial reduction (+:ia2)
161 ! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 }
162 !$acc end serial
163 !$acc serial reduction (+:ra1)
164 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
165 !$acc end serial
166 !$acc serial reduction (+:ca1)
167 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
168 !$acc end serial
169 !$acc serial reduction (+:da1)
170 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
171 !$acc end serial
172 !$acc serial reduction (.and.:la1)
173 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
174 !$acc end serial
175 !$acc serial reduction (+:i3, r1, d1, c1)
176 !$acc end serial
177 !$acc serial reduction (*:i3, r1, d1, c1)
178 !$acc end serial
179 !$acc serial reduction (-:i3, r1, d1, c1)
180 !$acc end serial
181 !$acc serial reduction (.and.:l1)
182 !$acc end serial
183 !$acc serial reduction (.or.:l1)
184 !$acc end serial
185 !$acc serial reduction (.eqv.:l1)
186 !$acc end serial
187 !$acc serial reduction (.neqv.:l1)
188 !$acc end serial
189 !$acc serial reduction (min:i3, r1, d1)
190 !$acc end serial
191 !$acc serial reduction (max:i3, r1, d1)
192 !$acc end serial
193 !$acc serial reduction (iand:i3)
194 !$acc end serial
195 !$acc serial reduction (ior:i3)
196 !$acc end serial
197 !$acc serial reduction (ieor:i3)
198 !$acc end serial
199 !$acc serial reduction (+:/blk/) ! { dg-error "Syntax error" }
200 !$acc end serial ! { dg-error "Unexpected" }
201 !$acc serial reduction (*:p1) ! { dg-error "POINTER object" }
202 !$acc end serial
203 !$acc serial reduction (-:aa1)
204 ! { dg-error "Array 'aa1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
205 !$acc end serial
206 !$acc serial reduction (*:ia1) ! { dg-error "Assumed size" }
207 ! { dg-error "Array 'ia1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
208 !$acc end serial
209 !$acc serial reduction (+:l1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type LOGICAL" }
210 !$acc end serial
211 !$acc serial reduction (*:la1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type LOGICAL" }
212 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
213 !$acc end serial
214 !$acc serial reduction (-:a1) ! { dg-error "OMP DECLARE REDUCTION - not found for type CHARACTER" }
215 !$acc end serial
216 !$acc serial reduction (+:t1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type TYPE" }
217 !$acc end serial
218 !$acc serial reduction (*:ta1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type TYPE" }
219 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
220 !$acc end serial
221 !$acc serial reduction (.and.:i3) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type INTEGER" }
222 !$acc end serial
223 !$acc serial reduction (.or.:ia2) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type INTEGER" }
224 ! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 }
225 !$acc end serial
226 !$acc serial reduction (.eqv.:r1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type REAL" }
227 !$acc end serial
228 !$acc serial reduction (.neqv.:ra1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type REAL" }
229 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
230 !$acc end serial
231 !$acc serial reduction (.and.:d1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type REAL" }
232 !$acc end serial
233 !$acc serial reduction (.or.:da1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type REAL" }
234 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
235 !$acc end serial
236 !$acc serial reduction (.eqv.:c1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type COMPLEX" }
237 !$acc end serial
238 !$acc serial reduction (.neqv.:ca1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type COMPLEX" }
239 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
240 !$acc end serial
241 !$acc serial reduction (.and.:a1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type CHARACTER" }
242 !$acc end serial
243 !$acc serial reduction (.or.:t1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type TYPE" }
244 !$acc end serial
245 !$acc serial reduction (.eqv.:ta1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type TYPE" }
246 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
247 !$acc end serial
248 !$acc serial reduction (min:c1) ! { dg-error "OMP DECLARE REDUCTION min not found for type COMPLEX" }
249 !$acc end serial
250 !$acc serial reduction (max:ca1) ! { dg-error "OMP DECLARE REDUCTION max not found for type COMPLEX" }
251 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
252 !$acc end serial
253 !$acc serial reduction (max:l1) ! { dg-error "OMP DECLARE REDUCTION max not found for type LOGICAL" }
254 !$acc end serial
255 !$acc serial reduction (min:la1) ! { dg-error "OMP DECLARE REDUCTION min not found for type LOGICAL" }
256 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
257 !$acc end serial
258 !$acc serial reduction (max:a1) ! { dg-error "OMP DECLARE REDUCTION max not found for type CHARACTER" }
259 !$acc end serial
260 !$acc serial reduction (min:t1) ! { dg-error "OMP DECLARE REDUCTION min not found for type TYPE" }
261 !$acc end serial
262 !$acc serial reduction (max:ta1) ! { dg-error "OMP DECLARE REDUCTION max not found for type TYPE" }
263 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
264 !$acc end serial
265 !$acc serial reduction (iand:r1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type REAL" }
266 !$acc end serial
267 !$acc serial reduction (ior:ra1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" }
268 ! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
269 !$acc end serial
270 !$acc serial reduction (ieor:d1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type REAL" }
271 !$acc end serial
272 !$acc serial reduction (ior:da1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" }
273 ! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
274 !$acc end serial
275 !$acc serial reduction (iand:c1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type COMPLEX" }
276 !$acc end serial
277 !$acc serial reduction (ior:ca1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type COMPLEX" }
278 ! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
279 !$acc end serial
280 !$acc serial reduction (ieor:l1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type LOGICAL" }
281 !$acc end serial
282 !$acc serial reduction (iand:la1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type LOGICAL" }
283 ! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
284 !$acc end serial
285 !$acc serial reduction (ior:a1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type CHARACTER" }
286 !$acc end serial
287 !$acc serial reduction (ieor:t1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type TYPE" }
288 !$acc end serial
289 !$acc serial reduction (iand:ta1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type TYPE" }
290 ! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 }
291 !$acc end serial
292
293 end subroutine