Files
ww/test/wcc/data/r797_nestfill_box/case.ww
Hojun-Cho c78bf6ebca test: port the xmod same-leaf collision carriers to corpus fixtures
752_modparam_callee.c -> r752_modparam_xmod_variadic_vs_scalar,
  r752_modparam_variadic_no_collision (run; alpha/beta module dirs)
784_xmod_alias_struct_collide_run.c -> r784_xmod_alias_struct_collide
  (run-exit 42), r784_xmod_alias_struct_symmetric (21),
  r784_xmod_alias_control (30) (sa/sb module dirs)
793_xmod_struct_argpush_collide_run.c -> r793_xmod_argpush_
  {recvpush_t16 107, fieldread_t16 107, combined_t16 114,
  recvpush_t12 6} (m1/m2 module dirs)
797_xmod_struct_field_layout_collide_run.c -> r797_xmod_layout_
  {ptrread_t16 107, letcopy_t16 107, addrptr_pq 10, addrval_pq 10,
  ptrwrite_t16 109, valwrite_t16 109} (m1/m2) + r797_nestfill_box (66)

r770-style sibling module dirs express the trees; the fixture corpus
runs both drivers natively (784's wwstage-build-only leg upgrades to
build+run) and test-data-byteid owns each carrier's aggregated per-
package .s compare (letcopy_t16's real discriminator). All 16 probed
green on both stages including per-package byte identity.
2026-08-08 14:33:23 +09:00

15 lines
749 B
Plaintext

//ww:run-exit 66
// migrated from test/wcc/797_xmod_struct_field_layout_collide_run.c: cgstructlitfilltn nested-recursion pin — struct-literal field store with a nested literal; single-dot readback helpers per the open wwstage chained-read gaps.
package main;
type deep = struct { d0: u64, d1: u64 };
type nst = struct { i0: u64, dp: deep };
type box = struct { tag: u64, ir: nst };
fn mkbox() box = { return box { tag = 0: u64, ir = nst { i0 = 0: u64, dp = deep { d0 = 0: u64, d1 = 0: u64 } } }; };
fn sumdeep(d: deep) u64 = { return d.d0 + d.d1; };
fn sumnst(n: nst) u64 = { return n.i0 + sumdeep(n.dp); };
fn main() i32 = {
let s = mkbox();
s.ir = nst { i0 = 11: u64, dp = deep { d0 = 22: u64, d1 = 33: u64 } };
return sumnst(s.ir): i32;
};