Message ID | 20190713063451.GG2125@tucnak |
---|---|
State | New |
Headers | show |
Series | Fix OpenMP target parallel reduction (task, ...) (PR c/91149) | expand |
--- gcc/c-family/c-omp.c.jj 2019-07-12 09:46:35.824602187 +0200 +++ gcc/c-family/c-omp.c 2019-07-12 16:07:14.494672183 +0200 @@ -1667,7 +1667,7 @@ c_omp_split_clauses (location_t loc, enu } else if (code != OMP_SECTIONS && (mask & (OMP_CLAUSE_MASK_1 - << PRAGMA_OMP_CLAUSE_SCHEDULE)) == 0 + << PRAGMA_OMP_CLAUSE_NUM_THREADS)) == 0 && (mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_SCHEDULE)) == 0) { --- gcc/testsuite/c-c++-common/gomp/reduction-task-3.c.jj 2019-07-12 16:22:44.005562884 +0200 +++ gcc/testsuite/c-c++-common/gomp/reduction-task-3.c 2019-07-12 16:16:24.447324301 +0200 @@ -0,0 +1,12 @@ +/* PR c/91149 */ + +int r; + +void +foo (void) +{ + #pragma omp parallel reduction(task, +: r) + r++; + #pragma omp target parallel reduction(task, +: r) + r++; +}