authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-03-11 14:19:45-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-03-14 21:42:42-07:00
log54426bdc82ad361bb580f9678dd23417c350282a
tree7bdccf81b411acdc0ffad5e5f585e865e6b7280c
parent34a6fcd88e20a2491bf6a5396d583a7449cac20b

stage2: Fix assertion in struct field offset when all fields are 0-size


1 files changed, 2 insertions(+), 2 deletions(-)

src/type.zig+2-2
......@@ -4786,7 +4786,7 @@ pub const Type = extern union {
47864786 return field_offset.offset;
47874787 }
47884788
4789 return std.mem.alignForwardGeneric(u64, it.offset, it.big_align);
4789 return std.mem.alignForwardGeneric(u64, it.offset, @maximum(it.big_align, 1));
47904790 },
47914791
47924792 .tuple, .anon_struct => {
......@@ -4809,7 +4809,7 @@ pub const Type = extern union {
48094809 if (i == index) return offset;
48104810 offset += field_ty.abiSize(target);
48114811 }
4812 offset = std.mem.alignForwardGeneric(u64, offset, big_align);
4812 offset = std.mem.alignForwardGeneric(u64, offset, @maximum(big_align, 1));
48134813 return offset;
48144814 },
48154815