//ww:run-exit 0 // Run leg of the retired 926_tagged_sret_run.c row wide_assign_receive. package main; type oops = !str; type nomem = !void; type wide = struct { xs: []u8, ys: []u8, n: i64 }; fn mk(b: []u8, n: i64) (wide | oops | nomem) = { return wide { xs = b, ys = b, n = n }; }; export fn main() i32 = { let canary1: i64 = 111; let buf: [4]u8 = [1u8, 2u8, 3u8, 4u8]; let r: (wide | oops | nomem) = mk(buf[0:4], 5); let canary2: i64 = 222; r = mk(buf[0:4], 6); if (canary1 != 111) { return 21; }; if (canary2 != 222) { return 22; }; match (r) { case let w: wide => { if (w.n != 6) { return 1; }; }; case let e: oops => return 13; case nomem => return 14; }; return 0; };