summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop/large_array_index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/const_prop/large_array_index.rs')
-rw-r--r--src/test/mir-opt/const_prop/large_array_index.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/mir-opt/const_prop/large_array_index.rs b/src/test/mir-opt/const_prop/large_array_index.rs
new file mode 100644
index 000000000..48d134376
--- /dev/null
+++ b/src/test/mir-opt/const_prop/large_array_index.rs
@@ -0,0 +1,7 @@
+// EMIT_MIR_FOR_EACH_BIT_WIDTH
+
+// EMIT_MIR large_array_index.main.ConstProp.diff
+fn main() {
+ // check that we don't propagate this, because it's too large
+ let x: u8 = [0_u8; 5000][2];
+}