From 02cda698997e995f3841d379a13b9c0dd7a11e7c Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 15 Aug 2024 05:34:01 +0800 Subject: [PATCH] WIP - [artiq] Test --- nac3artiq/src/codegen.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index 97a8ed8c..f2378827 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -613,6 +613,7 @@ fn format_rpc_ret<'ctx>( let buffer = ArraySliceValue::from_ptr_val(buffer, ctx.builder.build_left_shift(buffer_size, llvm_usize.const_int(2, false), "").unwrap(), Some("rpc.buffer.ptr")); let i_addr = ctx.builder.build_alloca(llvm_usize, "i.addr").unwrap(); + ctx.builder.build_store(i_addr, llvm_usize.const_zero()).unwrap(); ctx.builder.build_unconditional_branch(head_bb).unwrap(); ctx.builder.position_at_end(head_bb);