This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp-nvptx 1/2] omp-low: add missing call to unshare_expr


	* 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);
 		    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]