summary refs log tree commit diff
path: root/src/test/run-pass/morestack5.rs
blob: ea4f6466ae8dc87e2605cf5afc0d2fa708fd6444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This test will call __morestack with various minimum stack sizes

use std;
import task;

fn getbig(&&i: int) {
    if i != 0 {
        getbig(i - 1);
    }
}

fn main() {
    let mut sz = 400u;
    while sz < 500u {
        task::try {|| getbig(200) };
        sz += 1u;
    }
}