Ignore reduction clause on kernels directive 2015-11-08 Tom de Vries * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION, classify as loop clause. --- gcc/c-family/c-omp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c index 3e93b59..a3b99b2 100644 --- a/gcc/c-family/c-omp.c +++ b/gcc/c-family/c-omp.c @@ -867,7 +867,7 @@ c_omp_check_loop_iv_exprs (location_t stmt_loc, tree declv, tree decl, tree c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses) { - tree next, loop_clauses, t; + tree next, loop_clauses; loop_clauses = *not_loop_clauses = NULL_TREE; for (; clauses ; clauses = next) @@ -886,16 +886,11 @@ c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses) case OMP_CLAUSE_SEQ: case OMP_CLAUSE_INDEPENDENT: case OMP_CLAUSE_PRIVATE: + case OMP_CLAUSE_REDUCTION: OMP_CLAUSE_CHAIN (clauses) = loop_clauses; loop_clauses = clauses; break; - /* Reductions belong in both constructs. */ - case OMP_CLAUSE_REDUCTION: - t = copy_node (clauses); - OMP_CLAUSE_CHAIN (t) = loop_clauses; - loop_clauses = t; - /* Parallel/kernels clauses. */ default: OMP_CLAUSE_CHAIN (clauses) = *not_loop_clauses; -- 1.9.1