Skip to content
Permalink
Browse files

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.)
  • Loading branch information...
pnkfelix committed Feb 22, 2019
1 parent 1349c84 commit e555854f9d738a1a786ca61875390c3aca777a8d
Showing with 13 additions and 4 deletions.
  1. +9 −4 src/test/ui/huge-array-simple.rs
  2. +4 −0 src/test/ui/huge-array-simple.stderr
@@ -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];
}
@@ -0,0 +1,4 @@
error: the type `[u8; N]` is too big for the current architecture

error: aborting due to previous error

0 comments on commit e555854

Please sign in to comment.
You can’t perform that action at this time.