diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-02-15 18:36:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-02-15 18:36:43 +0100 |
commit | 6837b3b895180864df03d01628eed75168c25a57 (patch) | |
tree | 259f85cd6ed7d67f133847ea1613a7e509e0bffb /gcc/tree-nested.c | |
parent | 92fab505d29cc38f12ad0369648ef7d0a54a3aef (diff) | |
download | gcc-6837b3b895180864df03d01628eed75168c25a57.zip gcc-6837b3b895180864df03d01628eed75168c25a57.tar.gz gcc-6837b3b895180864df03d01628eed75168c25a57.tar.bz2 |
re PR middle-end/35130 (OpenMP: Private variable passed to subroutine)
PR middle-end/35130
* tree-nested.c (convert_call_expr): Put FRAME.* vars into
OMP_CLAUSE_SHARED rather than OMP_CLAUSE_FIRSTPRIVATE clause.
* testsuite/libgomp.fortran/pr35130.f90: New test.
* testsuite/libgomp.c/pr35130.c: New test.
From-SVN: r132349
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 08f3eb1..a20e320 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1739,7 +1739,8 @@ convert_call_expr (tree *tp, int *walk_subtrees, void *data) break; if (c == NULL) { - c = build_omp_clause (OMP_CLAUSE_FIRSTPRIVATE); + c = build_omp_clause (i ? OMP_CLAUSE_FIRSTPRIVATE + : OMP_CLAUSE_SHARED); OMP_CLAUSE_DECL (c) = decl; OMP_CLAUSE_CHAIN (c) = OMP_PARALLEL_CLAUSES (t); OMP_PARALLEL_CLAUSES (t) = c; |