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.
This commit is contained in:
2026-08-08 14:29:28 +09:00
parent be852d51d9
commit c78bf6ebca
49 changed files with 420 additions and 1491 deletions

View File

@@ -0,0 +1,11 @@
//ww:run-exit 21
// migrated from test/wcc/784_xmod_alias_struct_collide_run.c: symmetric guard — sa's same-module STRUCT break must still fire with sb's same-leaf alias present.
package main;
import sa;
import sb;
export fn main() i32 = {
let o = sa.mk(21, 8);
let r = sa.geta(o);
if (r != 21) { return 11; };
return 21;
};

View File

@@ -0,0 +1,15 @@
// struct-side receiver for the r784 symmetric guard.
package sa;
export type s = struct {
a: i32,
b: i32,
};
export fn mk(av: i32, bv: i32) s = {
return s { a = av, b = bv };
};
export fn geta(x: s) i32 = {
return x.a;
};

View File

@@ -0,0 +1,8 @@
// foreign same-leaf pointer ALIAS `s` — a naive alias-first reorder would mis-peel sa's struct.
package sb;
export type vtable = struct {
q: i32,
};
export type s = *vtable;