Files
ww/test/wcc/data/r940_global_sret_branched/case.ww
Hojun-Cho 0b23f9fb31 test: fold driver-parity byteid into 989_lib_byteid, retire 815/940/951
Wwstage-driver-leg byte identity gets one owner. The three carriers'
content identity is already blanket-owned by their r815_/r940_/r951_
corpus twins via test-data-byteid; their only non-redundant assertion
was the ww_ww driver leg, which 989_lib_byteid's 43-unit sweep covers
apart from the zero-dep root-only edge — folded in as a new probe row
(44 units). r940 fixture comments re-cited off the retired carrier.
2026-08-08 00:36:11 +09:00

17 lines
590 B
Plaintext

//ww:run
// #220 global-sret family: runtime-branched callee (no constant-fold masking).
package main;
type quad = struct { a: i64, b: i64, c: i64, d: i64 };
fn mk1() quad = { return quad { a = 1i64, b = 2i64, c = 3i64, d = 4i64 }; };
fn mk2() quad = { return quad { a = 50i64, b = 0i64, c = 0i64, d = 0i64 }; };
fn pick(w: i64) quad = { if (w == 1i64) { return mk1(); }; return mk2(); };
let g: quad;
export fn main() i32 = {
g = pick(1i64);
if (g.a != 1i64) { return 1; };
if (g.b != 2i64) { return 2; };
if (g.c != 3i64) { return 3; };
if (g.d != 4i64) { return 4; };
return 0;
};