diff --git a/taichi/ir/frontend_ir.cpp b/taichi/ir/frontend_ir.cpp index 2bac3f58c32ef..51eee829d6926 100644 --- a/taichi/ir/frontend_ir.cpp +++ b/taichi/ir/frontend_ir.cpp @@ -362,7 +362,7 @@ void BinaryOpExpression::flatten(FlattenContext *ctx) { stmt->ret_type = ret_type; return; } - auto rhs_stmt = flatten_rvalue(rhs, &rctx); + auto rhs_stmt = flatten_rvalue(rhs, ctx); ctx->push_back(std::make_unique(type, lhs_stmt, rhs_stmt)); ctx->stmts.back()->tb = tb; stmt = ctx->back_stmt();