summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop/read_immutable_static.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/const_prop/read_immutable_static.rs')
-rw-r--r--src/test/mir-opt/const_prop/read_immutable_static.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/mir-opt/const_prop/read_immutable_static.rs b/src/test/mir-opt/const_prop/read_immutable_static.rs
new file mode 100644
index 000000000..8a5f12c6f
--- /dev/null
+++ b/src/test/mir-opt/const_prop/read_immutable_static.rs
@@ -0,0 +1,8 @@
+// compile-flags: -O
+
+static FOO: u8 = 2;
+
+// EMIT_MIR read_immutable_static.main.ConstProp.diff
+fn main() {
+ let x = FOO + FOO;
+}