diff options
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; |