From 532aa3c5758f110eb7cf0992eb394088ab563899 Mon Sep 17 00:00:00 2001 From: Matthew Lugg Date: Mon, 10 Nov 2025 12:12:37 +0000 Subject: cbe: work around some miscompilations The changes to `codegen.c` are blatant hacks, but the problem they work around isn't a regression: it's an existing miscompilation. This branch happened to *expose* that miscompilation in more cases by changing how an incorrect result is *used*. --- src/Type.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Type.zig') diff --git a/src/Type.zig b/src/Type.zig index d6e38420cb..b111650e34 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -3556,7 +3556,7 @@ pub fn packedStructFieldPtrInfo( } else .{ switch (zcu.comp.getZigBackend()) { else => (running_bits + 7) / 8, - .stage2_x86_64 => @intCast(struct_ty.abiSize(zcu)), + .stage2_x86_64, .stage2_c => @intCast(struct_ty.abiSize(zcu)), }, bit_offset, }; -- cgit v1.2.3