]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ignore reduction clause on kernels directive
authorTom de Vries <tom@codesourcery.com>
Mon, 18 Jan 2016 14:48:26 +0000 (14:48 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 18 Jan 2016 14:48:26 +0000 (14:48 +0000)
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

gcc/c-family/ChangeLog
gcc/c-family/c-omp.c

index 595b92fe74ba5fa671159aa9e27f18d7d21315dd..33f28845fe7fc4c780a84c19dcd2bca6fefcd74d 100644 (file)
@@ -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
index 81fb30a1c491923252313165c7bea863d966af17..5469d0d56259bf6650622e6647c790a6dc7d3a60 100644 (file)
@@ -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;