Hi!

Another thing I've missed in the testing (or lack thereof) of the
task reduction parsing patch.  Reduction is a data sharing clause
that is best located on the task construct for the taskloop IL sandwich,
it will be of course added as argument to the GOMP_taskloop call
when implemented later.

Regtested on x86_64-linux, committed to gomp-5_0-branch.

2017-06-30  Jakub Jelinek  <ja...@redhat.com>

        * gimplify.c (gimplify_omp_for): Move OMP_CLAUSE_REDUCTION
        and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
        sandwiched in between two taskloops.

--- gcc/gimplify.c.jj   2017-05-24 14:45:26.000000000 +0200
+++ gcc/gimplify.c      2017-06-30 17:22:21.401090633 +0200
@@ -10273,6 +10273,8 @@ gimplify_omp_for (tree *expr_p, gimple_s
          case OMP_CLAUSE_FINAL:
          case OMP_CLAUSE_MERGEABLE:
          case OMP_CLAUSE_PRIORITY:
+         case OMP_CLAUSE_REDUCTION:
+         case OMP_CLAUSE_IN_REDUCTION:
            *gtask_clauses_ptr = c;
            gtask_clauses_ptr = &OMP_CLAUSE_CHAIN (c);
            break;

        Jakub

Reply via email to