//ww:run-exit 0 // #234 chained-leaf arm: `o.a.b = f()` with a >24B sret-class return // routes the callee's hidden RDI at the leaf slot. Pre-fix both stages // fell to the scalar tail and stored ONE word (the sret dest pointer). package main; type big = struct { x: i64, y: i64, z: i64, w: i64 }; type mid = struct { pad: i64, b: big }; type outer = struct { a: mid }; fn f() big = { let r: big; r.x = 11; r.y = 22; r.z = 33; r.w = 44; return r; }; export fn main() i32 = { let o: outer; o.a.pad = 7; o.a.b = f(); if (o.a.pad != 7) { return 1; }; if (o.a.b.x != 11) { return 2; }; if (o.a.b.y != 22) { return 3; }; if (o.a.b.z != 33) { return 4; }; if (o.a.b.w != 44) { return 5; }; return 0; };