This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp-nvptx 1/2] omp-low: add missing call to unshare_expr
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 8 Nov 2016 19:01:44 +0300
- Subject: [gomp-nvptx 1/2] omp-low: add missing call to unshare_expr
- Authentication-results: sourceware.org; auth=none
- References: <1478620905-27011-1-git-send-email-amonakov@ispras.ru>
* omp-low.c (lower_lastprivate_clauses): Add missing call to
unshare_expr.
---
gcc/ChangeLog.gomp-nvptx | 5 +++++
gcc/omp-low.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 347730d..da5476b 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -5599,6 +5599,7 @@ lower_lastprivate_clauses (tree clauses, tree predicate, gimple_seq *stmt_list,
x = build_call_expr_internal_loc
(UNKNOWN_LOCATION, IFN_GOMP_SIMT_XCHG_IDX,
TREE_TYPE (new_var), 2, new_var, simtlast);
+ new_var = unshare_expr (new_var);
gimplify_assign (new_var, x, stmt_list);
new_var = unshare_expr (new_var);
}