test: replace duplicate row 5 in 762 with mid-record-pad shape
Row 5 in 098b58d was byte-identical to row 2 ({i32,i32,i64} fields
{{4,4},{4,4},{8,8}}): same struct, same field table, only label
differed. The row's own comment acknowledged "off from 8→8 (already
aligned)" — i.e., it did not exercise mid-record alignment at all
despite the label "i32_i32_i64_mid_align" and the commit-body
listing "mid-record align step explicit".
Replace with {i16, i64}: after f1 off=2, f2 must align off 2→8
before placing the i64. A missing `off = align(off, fa)` on either
walker (check.c:760 / check.ww:958 / structabisize) would land f2
at off=2 and size to 10 — clearly red. This is the shape the row
was meant to be.
Six distinct shapes after this fix; gate polarity unchanged (GREEN).
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user