musttail_stack_args.toy (478B)
1 fn many(a: i64, b: i64, c: i64, d: i64, e: i64, 2 f: i64, g: i64, h: i64, i: i64, j: i64): i64 { 3 return a; 4 } 5 6 // musttail to a callee needing stack arguments that don't fit the caller's 7 // (empty) incoming parameter area is not realizable: CG must diagnose rather 8 // than silently fall back. 9 fn caller(x: i64): i64 { 10 return musttail many(x, 0, 0, 0, 0, 0, 0, 0, 0, 0); 11 } 12 13 fn __user_main(): i64 { 14 return caller(42); 15 } 16 17 fn main(): i32 { return __user_main() as i32; }