We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe51696 + 88922e3 commit a288e8cCopy full SHA for a288e8c
1 file changed
tests/ui/codegen/huge-stacks.rs
@@ -0,0 +1,23 @@
1
+//@ revisions: unoptimized optimized
2
+//@[optimized]compile-flags: -O
3
+//@ run-pass
4
+//@ only-64bit
5
+//@ min-llvm-version: 22
6
+
7
+// Regression test for https://github.com/rust-lang/rust/issues/83060
8
9
+fn func() {
10
+ const CAP: usize = std::u32::MAX as usize;
11
+ let mut x: [u8; CAP] = [0; CAP];
12
+ x[2] = 123;
13
+ assert_eq!(x[2], 123);
14
+}
15
16
+fn main() {
17
+ std::thread::Builder::new()
18
+ .stack_size(5 * 1024 * 1024 * 1024)
19
+ .spawn(func)
20
+ .unwrap()
21
+ .join()
22
+ .unwrap();
23
0 commit comments