From d1e7e243562bd65e7cb45ff2cd2585ac334e5ec7 Mon Sep 17 00:00:00 2001 From: Zhen Zhang Date: Thu, 25 Oct 2018 15:55:13 -0700 Subject: [PATCH] fix tuple copy --- cozy/codegen/cxx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cozy/codegen/cxx.py b/cozy/codegen/cxx.py index 275dcf58..1d3649a4 100644 --- a/cozy/codegen/cxx.py +++ b/cozy/codegen/cxx.py @@ -278,7 +278,7 @@ def construct_concrete(self, t : Type, e : Exp, out : Exp): x = self.fv(t, "x") indices = range(len(t.ts)) return SSeq( - SEscape("{indent}{rv} = {rhs};\n", ["rv", "rhs"], [x, e]), + SEscape("{indent}" + self.visit(t, x.id) + " = {rhs};\n", ("rhs",), (e,)), SEscape("{indent}{lhs} = {rv};\n", ["lhs", "rv"], [out, ETuple([ETupleGet(x, i).with_type(t.ts[i]) for i in indices]).with_type(t)]), )