summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/mir_heavy_promoted.rs
blob: 092299880e2dc3e34ea2c89988b8bf64cbfaaa1e (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass
// ignore-emscripten apparently only works in optimized mode

const TEST_DATA: [u8; 32 * 1024 * 1024] = [42; 32 * 1024 * 1024];

// Check that the promoted copy of TEST_DATA doesn't
// leave an alloca from an unused temp behind, which,
// without optimizations, can still blow the stack.
fn main() {
    println!("{}", TEST_DATA.len());
}