diff --git a/compiler/rustc_codegen_llvm/src/va_arg.rs b/compiler/rustc_codegen_llvm/src/va_arg.rs index 09d3a5a3f040f..b8d1cd3504517 100644 --- a/compiler/rustc_codegen_llvm/src/va_arg.rs +++ b/compiler/rustc_codegen_llvm/src/va_arg.rs @@ -994,7 +994,7 @@ fn emit_xtensa_va_arg<'ll, 'tcx>( // let offset_next_corrected = offset_corrected + slot_size; // va_ndx = offset_next_corrected; - let offset_next_corrected = bx.add(offset_next, bx.const_i32(slot_size)); + let offset_next_corrected = bx.add(offset_corrected, bx.const_i32(slot_size)); // update va_ndx bx.store(offset_next_corrected, offset_ptr, ptr_align_abi);