Skip to content

Commit e555854

Browse files
committed
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.)
1 parent 1349c84 commit e555854

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/test/ui/huge-array-simple.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
// FIXME (#23926): the error output is not consistent between a
2-
// self-hosted and a cross-compiled setup. Skipping for now.
3-
4-
// ignore-test FIXME(#23926)
1+
// error-pattern: too big for the current architecture
52

3+
// normalize-stderr-test "; \d+]" -> "; N]"
64
#![allow(exceeding_bitshifts)]
75

6+
#[cfg(target_pointer_width = "64")]
87
fn main() {
98
let _fat : [u8; (1<<61)+(1<<31)] =
109
[0; (1u64<<61) as usize +(1u64<<31) as usize];
1110
}
11+
12+
#[cfg(target_pointer_width = "32")]
13+
fn main() {
14+
let _fat : [u8; (1<<31)+(1<<15)] =
15+
[0; (1u32<<31) as usize +(1u32<<15) as usize];
16+
}

src/test/ui/huge-array-simple.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: the type `[u8; N]` is too big for the current architecture
2+
3+
error: aborting due to previous error
4+

0 commit comments

Comments
 (0)