Debian Codegraph @

gcc/testsuite/rust/compile/torture/arrays6.rs

raw
1
2 // Checks that we don't try to allocate a 4TB array during compilation
3 fn foo() -> [u8; 4 * 1024 * 1024 * 1024 * 1024] {
4 [0; 4 * 1024 * 1024 * 1024 * 1024]
5 }
6
7 fn main () {
8 let x = foo ();
9 // { dg-warning "unused name" "" { target *-*-* } .-1 }
10 }