summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/boxes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/boxes.rs')
-rw-r--r--tests/mir-opt/const_prop/boxes.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
new file mode 100644
index 000000000..d287830db
--- /dev/null
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -0,0 +1,14 @@
+// unit-test: ConstProp
+// compile-flags: -O
+// ignore-emscripten compiled with panic=abort by default
+// ignore-wasm32
+// ignore-wasm64
+
+#![feature(box_syntax)]
+
+// Note: this test verifies that we, in fact, do not const prop `box`
+
+// EMIT_MIR boxes.main.ConstProp.diff
+fn main() {
+ let x = *(box 42) + 0;
+}