aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2016-01-18 14:48:26 +0000
committerTom de Vries <vries@gcc.gnu.org>2016-01-18 14:48:26 +0000
commitf62bf0924e9d0cbd429be8b57e5801b7f4c69c7c (patch)
treeea7d269c1c302f75b2a0ea2f93720e7a19cdff95 /gcc
parentb555a2e4c36b415edb82d8e6d31b8735c62d2bfb (diff)
downloadgcc-f62bf0924e9d0cbd429be8b57e5801b7f4c69c7c.zip
gcc-f62bf0924e9d0cbd429be8b57e5801b7f4c69c7c.tar.gz
gcc-f62bf0924e9d0cbd429be8b57e5801b7f4c69c7c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-omp.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 595b92f..33f2884 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR bootstrap/68271
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 81fb30a..5469d0d5 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -863,7 +863,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)
@@ -882,16 +882,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;