summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-66397.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/issue-66397.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-66397.rs b/src/test/ui/consts/issue-66397.rs
new file mode 100644
index 000000000..1b4aff43b
--- /dev/null
+++ b/src/test/ui/consts/issue-66397.rs
@@ -0,0 +1,8 @@
+// check-pass
+// only-x86_64
+
+// Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash.
+
+fn main() {
+ [0; 4 * 1024 * 1024 * 1024 * 1024];
+}