Make target pointer-width specific variants of (very old) huge-array-simple.rs test.
(and now unignore the test since it shouldn't break tests of cross-compiles anymore.)
This commit is contained in:
parent
1349c84a4f
commit
e555854f9d
2 changed files with 13 additions and 4 deletions
|
@ -1,11 +1,16 @@
|
|||
// FIXME (#23926): the error output is not consistent between a
|
||||
// self-hosted and a cross-compiled setup. Skipping for now.
|
||||
|
||||
// ignore-test FIXME(#23926)
|
||||
// error-pattern: too big for the current architecture
|
||||
|
||||
// normalize-stderr-test "; \d+]" -> "; 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];
|
||||
}
|
||||
|
|
4
src/test/ui/huge-array-simple.stderr
Normal file
4
src/test/ui/huge-array-simple.stderr
Normal file
|
@ -0,0 +1,4 @@
|
|||
error: the type `[u8; N]` is too big for the current architecture
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue