diff --git a/test/wcc/762_struct_abi_size.c b/test/wcc/762_struct_abi_size.c index 6afcc21e..ada58c46 100644 --- a/test/wcc/762_struct_abi_size.c +++ b/test/wcc/762_struct_abi_size.c @@ -33,8 +33,8 @@ * 3. {i64,i32,i32} — maxalign 8 with sub-8 tail, ABI 16 * (the #169 round-up case) * 4. {3xi16} — maxalign 2, natural 6, ABI 6 - * 5. {2xi32,i64} — maxalign 8 with mid-record alignment - * padding (f3 must skip to off=8) + * 5. {i16,i64} — maxalign 8 with mid-record alignment + * padding (f2 must skip off 2→8) * 6. {3xi64} — maxalign 8, all 8-wide, natural==ABI=24 * * GATE POLARITY: this file must stay GREEN. A red here means either @@ -111,13 +111,17 @@ static const struct row rows[] = { "type t = struct { a: i16, b: i16, c: i16 };\n" "export fn main() i32 = { return size(t): i32; };\n", 3, {{2,2},{2,2},{2,2}} }, - /* 5. {2xi32,i64} — f3 must skip off from 8→8 (already aligned) - * but the row exercises the mid-record align step explicitly; - * a missing `off = align(off, fa)` would mis-place the i64. */ - { "i32_i32_i64_mid_align", - "type t = struct { a: i32, b: i32, c: i64 };\n" + /* 5. {i16,i64} — exercises a non-trivial mid-record align step: + * after f1 off=2, f2 must align off 2→8 before placing the i64. + * A missing `off = align(off, fa)` would land f2 at off=2 and + * size to 10 (or 16 only via the final maxalign round); either + * way it would diverge from the formula. {i32,i32,i64} (rows 2) + * already aligns at 8 by the natural off, so the align-step is + * a no-op there. */ + { "i16_i64_mid_pad", + "type t = struct { a: i16, b: i64 };\n" "export fn main() i32 = { return size(t): i32; };\n", - 3, {{4,4},{4,4},{8,8}} }, + 2, {{2,2},{8,8}} }, /* 6. {3xi64} — natural==ABI, the maxalign-rounded formula must * not double-round. */ { "i64_x3_natural_24",