Skip to content

Commit 218b339

Browse files
committed
Test 64bit & 32bit
1 parent f17a9ce commit 218b339

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/ui/codegen/issue-83060-large-stack-size.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// build-fail
2-
// only-64bit
32
fn func() {
43
const CAP: usize = std::u32::MAX as usize;
54
let mut x: [u8; CAP>>1] = [0; CAP>>1];
@@ -8,8 +7,12 @@ fn func() {
87
}
98

109
fn main() {
10+
let mut n = 5;
11+
if cfg!(target_pointer_width = "32") {
12+
n = 3;
13+
}
1114
std::thread::Builder::new()
12-
.stack_size(5 * 1024 * 1024 * 1024)
15+
.stack_size(n * 1024 * 1024 * 1024)
1316
.spawn(func)
1417
.unwrap()
1518
.join()

0 commit comments

Comments
 (0)