Skip to content

Commit f88ff0b

Browse files
committed
tests: activate misspelled gdb-check in function-arg-initialization.rs
In 9253e12 a bunch of `gdbr-check` (for `rust-gdb`) and `gdbg-check` (for plain `gdb`) was added. But in two places the author accidentally wrote `gdbt-check` instead. This commit fixes this typo. Note that we need to add a `std::hint::black_box()` to avoid $4 = <optimized out> prints on at least `aarch64-gnu-llvm-20-1`.
1 parent 4f08307 commit f88ff0b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/debuginfo/function-arg-initialization.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
// NON IMMEDIATE ARGS
2828
// gdb-command:print a
29-
// gdbt-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10}
29+
// gdb-check:$4 = function_arg_initialization::BigStruct {a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10}
3030
// gdb-command:print b
31-
// gdbt-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18}
31+
// gdb-check:$5 = function_arg_initialization::BigStruct {a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18}
3232
// gdb-command:continue
3333

3434
// BINDING
@@ -234,6 +234,7 @@ struct BigStruct {
234234

235235
fn non_immediate_args(a: BigStruct, b: BigStruct) {
236236
zzz(); // #break
237+
std::hint::black_box(|| { let _ = (a, b); }); // Avoid `<optimized out>` prints
237238
}
238239

239240
fn binding(a: i64, b: u64, c: f64) {

0 commit comments

Comments
 (0)