This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4] firstprivate bug in combined acc loops
- From: Cesar Philippidis <cesar at codesourcery dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Aug 2015 08:11:40 -0700
- Subject: [gomp4] firstprivate bug in combined acc loops
- Authentication-results: sourceware.org; auth=none
This patch addresses a bug where a firstprivate clause in a combined
parallel/kernels loop is propagated to an acc loop. I came across this
bug when I was testing the new reduction changes. There's a test case
for this in my reduction patch set, so I didn't include one here.
This patch has been committed to gomp-4_0-branch.
Cesar
2015-08-24 Cesar Philippidis <cesar@codesourcery.com>
gcc/c-family
* c-omp.c (c_oacc_split_loop_clauses): Don't propagate
OMP_CLAUSE_FIRSTPRIVATE to acc loops with splitting the clauses.
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index e9df829..798174c 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -1110,7 +1110,6 @@ c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses)
loop_clauses = clauses;
break;
- case OMP_CLAUSE_FIRSTPRIVATE:
case OMP_CLAUSE_PRIVATE:
c = build_omp_clause (OMP_CLAUSE_LOCATION (clauses),
OMP_CLAUSE_CODE (clauses));