6 #pragma omp scan inclusive (a) /* { dg-error "'#pragma omp scan' may only be used in a loop construct with 'inscan' 'reduction' clause" } */
7 #pragma omp scan exclusive (b) /* { dg-error "'#pragma omp scan' may only be used in a loop construct with 'inscan' 'reduction' clause" } */
11 f2 (int *c
, int *d
, int *e
, int *f
)
14 #pragma omp for reduction (inscan, +: a) reduction (+: b) /* { dg-error "'inscan' and non-'inscan' 'reduction' clauses on the same construct" } */
15 for (i
= 0; i
< 64; i
++)
18 #pragma omp scan inclusive (a) /* { dg-error "" } */
21 #pragma omp for reduction (+: a) reduction (inscan, +: b) /* { dg-error "'inscan' and non-'inscan' 'reduction' clauses on the same construct" } */
22 for (i
= 0; i
< 64; i
++)
25 #pragma omp scan inclusive (b) /* { dg-error "" } */
28 #pragma omp for reduction (inscan, +: e[:2]) /* { dg-error "'inscan' 'reduction' clause with array section" } */
29 for (i
= 0; i
< 64; ++i
)
31 { e
[0] += c
[i
]; e
[1] += c
[i
]; }
32 #pragma omp scan inclusive (a, e[:2]) /* { dg-error "" } */
33 { d
[i
] = e
[0]; f
[i
] = e
[1]; }
35 #pragma omp for reduction (inscan, +: a) ordered /* { dg-error "'ordered' clause specified together with 'inscan' 'reduction' clause" } */
36 for (i
= 0; i
< 64; i
++)
39 #pragma omp scan inclusive (a) /* { dg-error "" } */
42 #pragma omp for reduction (inscan, +: a) ordered(1) /* { dg-error "'ordered' clause specified together with 'inscan' 'reduction' clause" } */
43 for (i
= 0; i
< 64; i
++)
46 #pragma omp scan inclusive (a) /* { dg-error "" } */
49 #pragma omp for reduction (inscan, +: a) schedule(static) /* { dg-error "'schedule' clause specified together with 'inscan' 'reduction' clause" } */
50 for (i
= 0; i
< 64; i
++)
53 #pragma omp scan inclusive (a) /* { dg-error "" } */
56 #pragma omp for reduction (inscan, +: a) schedule(static, 2) /* { dg-error "'schedule' clause specified together with 'inscan' 'reduction' clause" } */
57 for (i
= 0; i
< 64; i
++)
60 #pragma omp scan inclusive (a) /* { dg-error "" } */
63 #pragma omp for reduction (inscan, +: a) schedule(nonmonotonic: dynamic, 2) /* { dg-error "'schedule' clause specified together with 'inscan' 'reduction' clause" } */
64 for (i
= 0; i
< 64; i
++)
67 #pragma omp scan inclusive (a) /* { dg-error "" } */
70 #pragma omp for reduction (inscan, +: a) linear (l) /* { dg-error "'inscan' 'reduction' clause used together with 'linear' clause for a variable other than loop iterator" } */
71 for (i
= 0; i
< 64; i
++)
74 #pragma omp scan inclusive (a)
83 #pragma omp teams reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on 'teams' construct" } */
85 #pragma omp parallel reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on 'parallel' construct" } */
87 #pragma omp sections reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on 'sections' construct" } */
92 #pragma omp scope reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on 'scope' construct" } */
94 #pragma omp target parallel for reduction (inscan, +: a) map (c[:64], d[:64]) /* { dg-error "'inscan' 'reduction' clause on construct other than 'for', 'simd', 'for simd', 'parallel for', 'parallel for simd'" } */
95 for (i
= 0; i
< 64; i
++)
98 #pragma omp scan exclusive (a) /* { dg-error "" } */
103 #pragma omp distribute parallel for reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on construct other than 'for', 'simd', 'for simd', 'parallel for', 'parallel for simd'" } */
104 for (i
= 0; i
< 64; i
++)
107 #pragma omp scan exclusive (a) /* { dg-error "" } */
110 #pragma omp distribute parallel for simd reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on construct other than 'for', 'simd', 'for simd', 'parallel for', 'parallel for simd'" } */
111 for (i
= 0; i
< 64; i
++)
114 #pragma omp scan exclusive (a) /* { dg-error "" } */
124 #pragma omp taskloop reduction (inscan, +: a) /* { dg-error "'inscan' 'reduction' clause on 'taskloop' construct" } */
125 for (i
= 0; i
< 64; i
++)
128 #pragma omp scan exclusive (a) /* { dg-error "" } */
137 #pragma omp simd reduction (inscan, +: a)
138 for (i
= 0; i
< 64; i
++)
141 #pragma omp scan exclusive (a, b) /* { dg-error "'b' specified in 'exclusive' clause but not in 'inscan' 'reduction' clause on the containing construct" } */
150 #pragma omp simd reduction (inscan, +: a, b) /* { dg-error "'b' specified in 'inscan' 'reduction' clause but not in 'scan' directive clause" } */
151 for (i
= 0; i
< 64; i
++)
154 #pragma omp scan exclusive (a)
163 #pragma omp simd reduction (inscan, +: a)
164 for (i
= 0; i
< 64; i
++)
166 if (i
== 23) /* { dg-error "invalid exit from OpenMP structured block" "" { target c++ } .+1 } */
167 continue; /* { dg-error "invalid branch to/from OpenMP structured block" "" { target c } } */
169 goto l1
; /* { dg-error "invalid branch to/from OpenMP structured block" } */
170 #pragma omp scan exclusive (a)
172 l1
: a
= 0; /* { dg-error "jump to label 'l1'" "" { target c++ } } */
173 if (i
== 33) /* { dg-error "invalid exit from OpenMP structured block" "" { target c++ } .+1 } */
174 continue; /* { dg-error "invalid branch to/from OpenMP structured block" "" { target c } } */
180 f8 (int *c
, int *d
, int *e
, int *f
)
183 #pragma omp for reduction (inscan, +: a, b) /* { dg-error "'b' specified in 'inscan' 'reduction' clause but not in 'scan' directive clause" } */
184 for (i
= 0; i
< 64; i
++)
186 { a
+= c
[i
]; b
+= d
[i
]; }
187 #pragma omp scan inclusive (a) inclusive (b) /* { dg-error "expected end of line before 'inclusive'" } */
188 { e
[i
] = a
; f
[i
] = b
; }
190 #pragma omp for reduction (inscan, +: a, b) /* { dg-error "'.' specified in 'inscan' 'reduction' clause but not in 'scan' directive clause" } */
191 for (i
= 0; i
< 64; i
++)
193 { a
+= c
[i
]; b
+= d
[i
]; }
194 #pragma omp scan /* { dg-error "expected 'inclusive' or 'exclusive' clause before end of line" } */
195 { e
[i
] = a
; f
[i
] = b
; }
203 #pragma omp simd reduction (inscan, +: a)
204 for (i
= 0; i
< 64; i
++)
206 if (i
== 23) /* { dg-error "invalid exit from OpenMP structured block" "" { target c++ } .+1 } */
207 break; /* { dg-error "break statement used with OpenMP for loop" "" { target c } } */
208 #pragma omp scan exclusive (a)