Commit f62bf092 by Tom de Vries Committed by Tom de Vries

Ignore reduction clause on kernels directive

2016-01-18  Tom de Vries  <tom@codesourcery.com>

	* c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
	classify as loop clause.

From-SVN: r232521
parent b555a2e4
2016-01-18 Tom de Vries <tom@codesourcery.com>
* c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
classify as loop clause.
2016-01-15 Jakub Jelinek <jakub@redhat.com> 2016-01-15 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/68271 PR bootstrap/68271
......
...@@ -863,7 +863,7 @@ c_omp_check_loop_iv_exprs (location_t stmt_loc, tree declv, tree decl, ...@@ -863,7 +863,7 @@ c_omp_check_loop_iv_exprs (location_t stmt_loc, tree declv, tree decl,
tree tree
c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses) 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; loop_clauses = *not_loop_clauses = NULL_TREE;
for (; clauses ; clauses = next) for (; clauses ; clauses = next)
...@@ -882,16 +882,11 @@ c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses) ...@@ -882,16 +882,11 @@ c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses)
case OMP_CLAUSE_SEQ: case OMP_CLAUSE_SEQ:
case OMP_CLAUSE_INDEPENDENT: case OMP_CLAUSE_INDEPENDENT:
case OMP_CLAUSE_PRIVATE: case OMP_CLAUSE_PRIVATE:
case OMP_CLAUSE_REDUCTION:
OMP_CLAUSE_CHAIN (clauses) = loop_clauses; OMP_CLAUSE_CHAIN (clauses) = loop_clauses;
loop_clauses = clauses; loop_clauses = clauses;
break; 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. */ /* Parallel/kernels clauses. */
default: default:
OMP_CLAUSE_CHAIN (clauses) = *not_loop_clauses; OMP_CLAUSE_CHAIN (clauses) = *not_loop_clauses;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment