1 // RUN: %libomp-compile-and-run
3 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8
10 int main(int argc
, char **argv
) {
15 #pragma omp taskgroup task_reduction(+: a) task_reduction(*: b)
18 for (i
= 1; i
<= 5; ++i
) {
19 #pragma omp task in_reduction(+: a) in_reduction(*: b)
23 #pragma omp task in_reduction(+: a)
33 fprintf(stderr
, "error: a != 30. Instead a = %d\n", a
);
37 fprintf(stderr
, "error: b != 120. Instead b = %d\n", b
);