| 1 |
void foo (void); |
| 2 |
int v; |
| 3 |
#ifdef __cplusplus |
| 4 |
extern "C" { |
| 5 |
#endif |
| 6 |
int omp_get_thread_num (void); |
| 7 |
int omp_get_num_threads (void); |
| 8 |
int omp_target_is_present (const void *, int); |
| 9 |
int omp_get_cancellation (void); |
| 10 |
#ifdef __cplusplus |
| 11 |
} |
| 12 |
#endif |
| 13 |
|
| 14 |
void |
| 15 |
f1 (int *a) |
| 16 |
{ |
| 17 |
int i; |
| 18 |
#pragma omp simd order(reproducible:concurrent) |
| 19 |
for (i = 0; i < 64; i++) |
| 20 |
{ |
| 21 |
#pragma omp parallel /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 22 |
foo (); |
| 23 |
} |
| 24 |
#pragma omp simd order(reproducible:concurrent) |
| 25 |
for (i = 0; i < 64; i++) |
| 26 |
{ |
| 27 |
int j; |
| 28 |
#pragma omp simd |
| 29 |
for (j = 0; j < 64; j++) |
| 30 |
a[64 * i + j] = i + j; |
| 31 |
} |
| 32 |
#pragma omp simd order(reproducible:concurrent) |
| 33 |
for (i = 0; i < 64; i++) |
| 34 |
{ |
| 35 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 36 |
foo (); |
| 37 |
} |
| 38 |
#pragma omp simd order(reproducible:concurrent) |
| 39 |
for (i = 0; i < 64; i++) |
| 40 |
{ |
| 41 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 42 |
foo (); |
| 43 |
} |
| 44 |
#pragma omp simd order(reproducible:concurrent) |
| 45 |
for (i = 0; i < 64; i++) |
| 46 |
{ |
| 47 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 48 |
v++; |
| 49 |
} |
| 50 |
#pragma omp simd order(reproducible:concurrent) |
| 51 |
for (i = 0; i < 64; i++) |
| 52 |
{ |
| 53 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 54 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 55 |
} |
| 56 |
#pragma omp simd order(reproducible:concurrent) |
| 57 |
for (i = 0; i < 64; i++) |
| 58 |
{ |
| 59 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 60 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 61 |
} |
| 62 |
#pragma omp simd order(reproducible:concurrent) |
| 63 |
for (i = 0; i < 64; i++) |
| 64 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 65 |
#pragma omp simd order(reproducible:concurrent) |
| 66 |
for (i = 0; i < 64; i++) |
| 67 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 68 |
#pragma omp simd order(reproducible:concurrent) |
| 69 |
for (i = 0; i < 64; i++) |
| 70 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 71 |
#pragma omp simd order(reproducible:concurrent) |
| 72 |
for (i = 0; i < 64; i++) |
| 73 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 74 |
} |
| 75 |
|
| 76 |
void |
| 77 |
f2 (int *a) |
| 78 |
{ |
| 79 |
int i; |
| 80 |
#pragma omp for simd order(reproducible:concurrent) |
| 81 |
for (i = 0; i < 64; i++) |
| 82 |
{ |
| 83 |
#pragma omp parallel /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 84 |
foo (); |
| 85 |
} |
| 86 |
#pragma omp for simd order(reproducible:concurrent) |
| 87 |
for (i = 0; i < 64; i++) |
| 88 |
{ |
| 89 |
int j; |
| 90 |
#pragma omp simd |
| 91 |
for (j = 0; j < 64; j++) |
| 92 |
a[64 * i + j] = i + j; |
| 93 |
} |
| 94 |
#pragma omp for simd order(reproducible:concurrent) |
| 95 |
for (i = 0; i < 64; i++) |
| 96 |
{ |
| 97 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 98 |
foo (); |
| 99 |
} |
| 100 |
#pragma omp for simd order(reproducible:concurrent) |
| 101 |
for (i = 0; i < 64; i++) |
| 102 |
{ |
| 103 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 104 |
foo (); |
| 105 |
} |
| 106 |
#pragma omp for simd order(reproducible:concurrent) |
| 107 |
for (i = 0; i < 64; i++) |
| 108 |
{ |
| 109 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 110 |
v++; |
| 111 |
} |
| 112 |
#pragma omp for simd order(reproducible:concurrent) |
| 113 |
for (i = 0; i < 64; i++) |
| 114 |
{ |
| 115 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 116 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 117 |
} |
| 118 |
#pragma omp for simd order(reproducible:concurrent) |
| 119 |
for (i = 0; i < 64; i++) |
| 120 |
{ |
| 121 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 122 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 123 |
} |
| 124 |
#pragma omp for simd order(reproducible:concurrent) |
| 125 |
for (i = 0; i < 64; i++) |
| 126 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 127 |
#pragma omp for simd order(reproducible:concurrent) |
| 128 |
for (i = 0; i < 64; i++) |
| 129 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 130 |
#pragma omp for simd order(reproducible:concurrent) |
| 131 |
for (i = 0; i < 64; i++) |
| 132 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 133 |
#pragma omp for simd order(reproducible:concurrent) |
| 134 |
for (i = 0; i < 64; i++) |
| 135 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 136 |
} |
| 137 |
|
| 138 |
void |
| 139 |
f3 (int *a) |
| 140 |
{ |
| 141 |
int i; |
| 142 |
#pragma omp for order(reproducible:concurrent) |
| 143 |
for (i = 0; i < 64; i++) |
| 144 |
{ |
| 145 |
#pragma omp parallel |
| 146 |
foo (); |
| 147 |
} |
| 148 |
#pragma omp for order(reproducible:concurrent) |
| 149 |
for (i = 0; i < 64; i++) |
| 150 |
{ |
| 151 |
int j; |
| 152 |
#pragma omp simd |
| 153 |
for (j = 0; j < 64; j++) |
| 154 |
a[64 * i + j] = i + j; |
| 155 |
} |
| 156 |
#pragma omp for order(reproducible:concurrent) |
| 157 |
for (i = 0; i < 64; i++) |
| 158 |
{ |
| 159 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 160 |
foo (); |
| 161 |
} |
| 162 |
#pragma omp for order(reproducible:concurrent) |
| 163 |
for (i = 0; i < 64; i++) |
| 164 |
{ |
| 165 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 166 |
foo (); |
| 167 |
} |
| 168 |
#pragma omp for order(reproducible:concurrent) |
| 169 |
for (i = 0; i < 64; i++) |
| 170 |
{ |
| 171 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 172 |
v++; |
| 173 |
} |
| 174 |
#pragma omp for order(reproducible:concurrent) |
| 175 |
for (i = 0; i < 64; i++) |
| 176 |
{ |
| 177 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 178 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 179 |
} |
| 180 |
#pragma omp for order(reproducible:concurrent) |
| 181 |
for (i = 0; i < 64; i++) |
| 182 |
{ |
| 183 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 184 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 185 |
} |
| 186 |
#pragma omp for order(reproducible:concurrent) |
| 187 |
for (i = 0; i < 64; i++) |
| 188 |
{ |
| 189 |
#pragma omp task /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 190 |
a[i]++; |
| 191 |
} |
| 192 |
#pragma omp for order(reproducible:concurrent) |
| 193 |
for (i = 0; i < 64; i++) |
| 194 |
{ |
| 195 |
int j; |
| 196 |
#pragma omp taskloop /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 197 |
for (j = 0; j < 64; j++) |
| 198 |
a[64 * i + j] = i + j; |
| 199 |
} |
| 200 |
#pragma omp for order(reproducible:concurrent) |
| 201 |
for (i = 0; i < 64; i++) |
| 202 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 203 |
#pragma omp for order(reproducible:concurrent) |
| 204 |
for (i = 0; i < 64; i++) |
| 205 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 206 |
#pragma omp for order(reproducible:concurrent) |
| 207 |
for (i = 0; i < 64; i++) |
| 208 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 209 |
#pragma omp for order(reproducible:concurrent) |
| 210 |
for (i = 0; i < 64; i++) |
| 211 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 212 |
} |
| 213 |
|
| 214 |
void |
| 215 |
f4 (int *a) |
| 216 |
{ |
| 217 |
int i; |
| 218 |
#pragma omp simd order(unconstrained:concurrent) |
| 219 |
for (i = 0; i < 64; i++) |
| 220 |
{ |
| 221 |
#pragma omp parallel /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 222 |
foo (); |
| 223 |
} |
| 224 |
#pragma omp simd order(unconstrained:concurrent) |
| 225 |
for (i = 0; i < 64; i++) |
| 226 |
{ |
| 227 |
int j; |
| 228 |
#pragma omp simd |
| 229 |
for (j = 0; j < 64; j++) |
| 230 |
a[64 * i + j] = i + j; |
| 231 |
} |
| 232 |
#pragma omp simd order(unconstrained:concurrent) |
| 233 |
for (i = 0; i < 64; i++) |
| 234 |
{ |
| 235 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 236 |
foo (); |
| 237 |
} |
| 238 |
#pragma omp simd order(unconstrained:concurrent) |
| 239 |
for (i = 0; i < 64; i++) |
| 240 |
{ |
| 241 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 242 |
foo (); |
| 243 |
} |
| 244 |
#pragma omp simd order(unconstrained:concurrent) |
| 245 |
for (i = 0; i < 64; i++) |
| 246 |
{ |
| 247 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 248 |
v++; |
| 249 |
} |
| 250 |
#pragma omp simd order(unconstrained:concurrent) |
| 251 |
for (i = 0; i < 64; i++) |
| 252 |
{ |
| 253 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 254 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 255 |
} |
| 256 |
#pragma omp simd order(unconstrained:concurrent) |
| 257 |
for (i = 0; i < 64; i++) |
| 258 |
{ |
| 259 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 260 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 261 |
} |
| 262 |
#pragma omp simd order(unconstrained:concurrent) |
| 263 |
for (i = 0; i < 64; i++) |
| 264 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 265 |
#pragma omp simd order(unconstrained:concurrent) |
| 266 |
for (i = 0; i < 64; i++) |
| 267 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 268 |
#pragma omp simd order(unconstrained:concurrent) |
| 269 |
for (i = 0; i < 64; i++) |
| 270 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 271 |
#pragma omp simd order(unconstrained:concurrent) |
| 272 |
for (i = 0; i < 64; i++) |
| 273 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 274 |
} |
| 275 |
|
| 276 |
void |
| 277 |
f5 (int *a) |
| 278 |
{ |
| 279 |
int i; |
| 280 |
#pragma omp for simd order(unconstrained:concurrent) |
| 281 |
for (i = 0; i < 64; i++) |
| 282 |
{ |
| 283 |
#pragma omp parallel /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 284 |
foo (); |
| 285 |
} |
| 286 |
#pragma omp for simd order(unconstrained:concurrent) |
| 287 |
for (i = 0; i < 64; i++) |
| 288 |
{ |
| 289 |
int j; |
| 290 |
#pragma omp simd |
| 291 |
for (j = 0; j < 64; j++) |
| 292 |
a[64 * i + j] = i + j; |
| 293 |
} |
| 294 |
#pragma omp for simd order(unconstrained:concurrent) |
| 295 |
for (i = 0; i < 64; i++) |
| 296 |
{ |
| 297 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'ordered simd', 'simd', 'loop' or 'atomic' may not be nested inside 'simd' region" } */ |
| 298 |
foo (); |
| 299 |
} |
| 300 |
#pragma omp for simd order(unconstrained:concurrent) |
| 301 |
for (i = 0; i < 64; i++) |
| 302 |
{ |
| 303 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 304 |
foo (); |
| 305 |
} |
| 306 |
#pragma omp for simd order(unconstrained:concurrent) |
| 307 |
for (i = 0; i < 64; i++) |
| 308 |
{ |
| 309 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 310 |
v++; |
| 311 |
} |
| 312 |
#pragma omp for simd order(unconstrained:concurrent) |
| 313 |
for (i = 0; i < 64; i++) |
| 314 |
{ |
| 315 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 316 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 317 |
} |
| 318 |
#pragma omp for simd order(unconstrained:concurrent) |
| 319 |
for (i = 0; i < 64; i++) |
| 320 |
{ |
| 321 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 322 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 323 |
} |
| 324 |
#pragma omp for simd order(unconstrained:concurrent) |
| 325 |
for (i = 0; i < 64; i++) |
| 326 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 327 |
#pragma omp for simd order(unconstrained:concurrent) |
| 328 |
for (i = 0; i < 64; i++) |
| 329 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 330 |
#pragma omp for simd order(unconstrained:concurrent) |
| 331 |
for (i = 0; i < 64; i++) |
| 332 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 333 |
#pragma omp for simd order(unconstrained:concurrent) |
| 334 |
for (i = 0; i < 64; i++) |
| 335 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 336 |
} |
| 337 |
|
| 338 |
void |
| 339 |
f6 (int *a) |
| 340 |
{ |
| 341 |
int i; |
| 342 |
#pragma omp for order(unconstrained:concurrent) |
| 343 |
for (i = 0; i < 64; i++) |
| 344 |
{ |
| 345 |
#pragma omp parallel |
| 346 |
foo (); |
| 347 |
} |
| 348 |
#pragma omp for order(unconstrained:concurrent) |
| 349 |
for (i = 0; i < 64; i++) |
| 350 |
{ |
| 351 |
int j; |
| 352 |
#pragma omp simd |
| 353 |
for (j = 0; j < 64; j++) |
| 354 |
a[64 * i + j] = i + j; |
| 355 |
} |
| 356 |
#pragma omp for order(unconstrained:concurrent) |
| 357 |
for (i = 0; i < 64; i++) |
| 358 |
{ |
| 359 |
#pragma omp critical /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 360 |
foo (); |
| 361 |
} |
| 362 |
#pragma omp for order(unconstrained:concurrent) |
| 363 |
for (i = 0; i < 64; i++) |
| 364 |
{ |
| 365 |
#pragma omp ordered simd /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 366 |
foo (); |
| 367 |
} |
| 368 |
#pragma omp for order(unconstrained:concurrent) |
| 369 |
for (i = 0; i < 64; i++) |
| 370 |
{ |
| 371 |
#pragma omp atomic /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 372 |
v++; |
| 373 |
} |
| 374 |
#pragma omp for order(unconstrained:concurrent) |
| 375 |
for (i = 0; i < 64; i++) |
| 376 |
{ |
| 377 |
#pragma omp atomic read /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 378 |
a[i] = v; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 379 |
} |
| 380 |
#pragma omp for order(unconstrained:concurrent) |
| 381 |
for (i = 0; i < 64; i++) |
| 382 |
{ |
| 383 |
#pragma omp atomic write /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c++ } } */ |
| 384 |
v = a[i]; /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" "" { target c } } */ |
| 385 |
} |
| 386 |
#pragma omp for order(unconstrained:concurrent) |
| 387 |
for (i = 0; i < 64; i++) |
| 388 |
{ |
| 389 |
#pragma omp task /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 390 |
a[i]++; |
| 391 |
} |
| 392 |
#pragma omp for order(unconstrained:concurrent) |
| 393 |
for (i = 0; i < 64; i++) |
| 394 |
{ |
| 395 |
int j; |
| 396 |
#pragma omp taskloop /* { dg-error "OpenMP constructs other than 'parallel', 'loop' or 'simd' may not be nested inside a region with the 'order\\(concurrent\\)' clause" } */ |
| 397 |
for (j = 0; j < 64; j++) |
| 398 |
a[64 * i + j] = i + j; |
| 399 |
} |
| 400 |
#pragma omp for order(unconstrained:concurrent) |
| 401 |
for (i = 0; i < 64; i++) |
| 402 |
a[i] += omp_get_thread_num (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_thread_num\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 403 |
#pragma omp for order(unconstrained:concurrent) |
| 404 |
for (i = 0; i < 64; i++) |
| 405 |
a[i] += omp_get_num_threads (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_threads\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 406 |
#pragma omp for order(unconstrained:concurrent) |
| 407 |
for (i = 0; i < 64; i++) |
| 408 |
a[i] += omp_target_is_present (a + i, 0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_target_is_present\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 409 |
#pragma omp for order(unconstrained:concurrent) |
| 410 |
for (i = 0; i < 64; i++) |
| 411 |
a[i] += omp_get_cancellation (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_cancellation\[^\n\r]*' in a region with 'order\\(concurrent\\)' clause" } */ |
| 412 |
} |