mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
12 lines
353 B
Rust
12 lines
353 B
Rust
//@ 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());
|
|
}
|