]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/mir_heavy_promoted.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / mir / mir_heavy_promoted.rs
1 // run-pass
2 // ignore-emscripten apparently only works in optimized mode
3
4 const TEST_DATA: [u8; 32 * 1024 * 1024] = [42; 32 * 1024 * 1024];
5
6 // Check that the promoted copy of TEST_DATA doesn't
7 // leave an alloca from an unused temp behind, which,
8 // without optimizations, can still blow the stack.
9 fn main() {
10     println!("{}", TEST_DATA.len());
11 }