about summary refs log tree commit diff
path: root/src/test/ui/huge-array-simple.rs
blob: 0ff27168a7d8634ac737ad8cbe1658f728f4cd51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// error-pattern: too big for the current architecture

// normalize-stderr-test "; \d+]" -> "; N]"

// FIXME https://github.com/rust-lang/rust/issues/59774
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
#![allow(exceeding_bitshifts)]

#[cfg(target_pointer_width = "64")]
fn main() {
    let _fat : [u8; (1<<61)+(1<<31)] =
        [0; (1u64<<61) as usize +(1u64<<31) as usize];
}

#[cfg(target_pointer_width = "32")]
fn main() {
    let _fat : [u8; (1<<31)+(1<<15)] =
        [0; (1u32<<31) as usize +(1u32<<15) as usize];
}