rust/src/test/run-pass/morestack2.rs

16 lines
243 B
Rust

// xfail-test
// compile-flags:--stack-growth
fn getbig(i: int) -> int {
let m = if i >= 0 {
let j = getbig(i - 1);
let k = getbig(j - 1);
k
} else {
0
};
m
}
fn main() {
getbig(10000000);
}