c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / gomp / reduction-task-2.c
blob225abed1bc60cbfa61df061fc14e5d5aa40d6e35
1 int v;
2 extern void foo (int);
4 void
5 bar (void)
7 int i;
8 #pragma omp for reduction (task, +: v) nowait /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */
9 for (i = 0; i < 64; i++)
10 foo (i);
11 #pragma omp sections nowait reduction (task, +: v) /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */
13 foo (-2);
14 #pragma omp section
15 foo (-3);
17 #pragma omp scope reduction (task, +: v) nowait /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */
18 foo (-4);
19 #pragma omp simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */
20 for (i = 0; i < 64; i++)
21 v++;
22 #pragma omp for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
23 for (i = 0; i < 64; i++)
24 v++;
25 #pragma omp parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
26 for (i = 0; i < 64; i++)
27 v++;
28 #pragma omp teams distribute parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
29 for (i = 0; i < 64; i++)
30 v++;
31 #pragma omp taskloop reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */
32 for (i = 0; i < 64; i++)
33 foo (i);
34 #pragma omp taskloop simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
35 for (i = 0; i < 64; i++)
36 v++;
37 #pragma omp teams reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for', 'sections' or 'scope'" } */
38 foo (i);
39 #pragma omp teams distribute reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct not combined with 'parallel', 'for' or 'sections'" } */
40 for (i = 0; i < 64; i++)
41 foo (i);