Files
ww/test/wcc/761_inferred_struct_arg_push.c
Hojun-Cho 276708f9d9 test: regression lock for inferred-struct-arg push (#16 lock)
Project #16 (inferred-let struct-typed local pushed as call-arg: cstage
2-word vs wwstage 1-word) does not reproduce on master. A 16-shape impl
sweep confirmed byte-identity for every reasonable trigger; the
mechanism that closed it is incidental, distributed across four
commits:

  ea1579a  exprtype resolves SK_USE module-qual N_DOT call results
  7198937  asserttyped bail armed (any nil-typed VALUE node fatal)
  39f9267  DOT-recv, structlit-fill, bare-let zero-init via structabisize
  66a91c8  let-IDENT memcpy, IDENT-assign recv, nested struct
           call-recv via structabisize

Together they guarantee `checkletassign` writes a resolvable type-AST
to `n.lhs` for every inferred let, `cglet` carries it onto the local's
`lc.tnode`, and `pushargsrev`'s N_IDENT struct arm (cgenutil.ww:459)
reaches `structparamsize > 0` so the 2-word push fires — byte-id with
cstage's `args[i]->type` -> struct_arg_size path (cgen.c:427, :5452).

This commit adds 761_inferred_struct_arg_push.c (6 table rows) to lock
that symmetric behavior in. Rows cover:

  i64_i64_infer_direct          canonical 16B
  u32_i64_decf_infer            decf32-shape (ken-flagged ftos.ww:411)
  i64_i32_narrow_tail_infer     #169 maxalign-8 tail-padded ABI
  i32_x3_maxalign4_infer        maxalign 4, ABI 12B
  ident_rhs_chain_infer         `let p = q;` two-step inference chain
  big_sret_infer_then_ptr_arg   >24B sret receive via callsretsize

Each row drives both stages, asserts cs==ww asm byte-id, and runs the
binary asserting the exact exit code. A future regression of any one
closing commit reds this gate at the matching shape; the citation map
in the comment header points the bisector at the four commits to walk.

Separate divergences surfaced during the sweep (filed independently,
not bundled here): #173 tagged-return-try, #174 cast-inferred call,
#175 arr[0] inferred, #176 nested-field let inferred, #177 aliased-
struct-return cstage 1-word.

make test: all 194 tests passed (exit 0).
2026-05-28 16:16:29 +09:00

12 KiB