about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/debuginfo/constant-ordering-prologue.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/debuginfo/constant-ordering-prologue.rs b/tests/debuginfo/constant-ordering-prologue.rs
new file mode 100644
index 00000000000..f2d4fd37ce3
--- /dev/null
+++ b/tests/debuginfo/constant-ordering-prologue.rs
@@ -0,0 +1,35 @@
+//@ min-lldb-version: 310
+
+//@ compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
+// gdb-command:break constant_ordering_prologue::binding
+// gdb-command:run
+
+// gdb-command:print a
+// gdb-check: = 19
+// gdb-command:print b
+// gdb-check: = 20
+// gdb-command:print c
+// gdb-check: = 21.5
+
+// === LLDB TESTS ==================================================================================
+
+// lldb-command:b "constant_ordering_prologue::binding"
+// lldb-command:run
+
+// lldb-command:print a
+// lldb-check: = 19
+// lldb-command:print b
+// lldb-check: = 20
+// lldb-command:print c
+// lldb-check: = 21.5
+
+fn binding(a: i64, b: u64, c: f64) {
+    let x = 0;
+}
+
+fn main() {
+    binding(19, 20, 21.5);
+}