comparison gcc/testsuite/c-c++-common/gomp/reduction-task-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 int v;
2 extern void foo (int);
3
4 void
5 bar (void)
6 {
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" } */
12 {
13 foo (-2);
14 #pragma omp section
15 foo (-3);
16 }
17 #pragma omp simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for' or 'sections'" } */
18 for (i = 0; i < 64; i++)
19 v++;
20 #pragma omp for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
21 for (i = 0; i < 64; i++)
22 v++;
23 #pragma omp parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
24 for (i = 0; i < 64; i++)
25 v++;
26 #pragma omp teams distribute parallel for simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
27 for (i = 0; i < 64; i++)
28 v++;
29 #pragma omp taskloop reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for' or 'sections'" } */
30 for (i = 0; i < 64; i++)
31 foo (i);
32 #pragma omp taskloop simd reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct combined with 'simd'" } */
33 for (i = 0; i < 64; i++)
34 v++;
35 #pragma omp teams reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct other than 'parallel', 'for' or 'sections'" } */
36 foo (i);
37 #pragma omp teams distribute reduction (task, +: v) /* { dg-error "invalid 'task' reduction modifier on construct not combined with 'parallel', 'for' or 'sections'" } */
38 for (i = 0; i < 64; i++)
39 foo (i);
40 }