diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 05bc957bbb..abcb9b4060 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -10668,8 +10668,7 @@ const ParamTypeIterator = struct { .memory => { it.zig_index += 1; it.llvm_index += 1; - it.byval_attr = true; - return .byref; + return .byref_mut; }, .sse => { it.zig_index += 1; diff --git a/test/c_abi/main.zig b/test/c_abi/main.zig index 426651aa9e..b0d7a822d2 100644 --- a/test/c_abi/main.zig +++ b/test/c_abi/main.zig @@ -1032,7 +1032,6 @@ extern fn c_modify_by_ref_param(ByRef) ByRef; test "C function modifies by ref param" { if (comptime builtin.cpu.arch.isPPC()) return error.SkipZigTest; - if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows and builtin.mode != .Debug) return error.SkipZigTest; const res = c_modify_by_ref_param(.{ .val = 1, .arr = undefined }); try expect(res.val == 42);