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:
12
test/wcc/data/r797_xmod_layout_ptrwrite_t16/case.ww
Normal file
12
test/wcc/data/r797_xmod_layout_ptrwrite_t16/case.ww
Normal file
@@ -0,0 +1,12 @@
|
||||
//ww:run-exit 109
|
||||
// migrated from test/wcc/797_xmod_struct_field_layout_collide_run.c: W1 arm — p.lo store offset/width through *struct under the same-leaf collision.
|
||||
package main;
|
||||
import m1;
|
||||
import m2;
|
||||
fn main() i32 = {
|
||||
let dummy: m2.pair;
|
||||
dummy.hi = 0: u64;
|
||||
let p = m1.mkp();
|
||||
p.lo = 9: u16;
|
||||
return (p.hi + (p.lo: u64)): i32;
|
||||
};
|
||||
10
test/wcc/data/r797_xmod_layout_ptrwrite_t16/m1/m1.ww
Normal file
10
test/wcc/data/r797_xmod_layout_ptrwrite_t16/m1/m1.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
// 16B pair + 16B all-u64 pq providers — the local side of the r797 collision.
|
||||
package m1;
|
||||
export type pair = struct { hi: u64, lo: u16 };
|
||||
export type pq = struct { a: u64, v: u64 };
|
||||
let g: pair = pair { hi = 100: u64, lo = 7: u16 };
|
||||
let gq: pq = pq { a = 1: u64, v = 7: u64 };
|
||||
export fn mk() pair = { return pair { hi = 100: u64, lo = 7: u16 }; };
|
||||
export fn mkp() *pair = { return &g; };
|
||||
export fn mkq() pq = { return pq { a = 1: u64, v = 7: u64 }; };
|
||||
export fn mkpq() *pq = { return &gq; };
|
||||
5
test/wcc/data/r797_xmod_layout_ptrwrite_t16/m2/m2.ww
Normal file
5
test/wcc/data/r797_xmod_layout_ptrwrite_t16/m2/m2.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
// 24B same-leaf pair + pq — the name-keyed lookup's mis-resolution bait.
|
||||
package m2;
|
||||
export type pair = struct { hi: u64, mid: u64, lo: u64 };
|
||||
export type pq = struct { a: u64, b: u64, v: u64 };
|
||||
export fn use2(p: pair) i32 = { return (p.hi + p.mid + p.lo): i32; };
|
||||
Reference in New Issue
Block a user