MIR-inlined functions called with constants should put the constant in debug info #110675
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
The following code calls
is_digit
with a constant radix:rust/tests/mir-opt/issues/issue_59352.rs
Lines 13 to 16 in 37b22cf
The MIR inliner preserves a local variable that's "holding" the value
rust/tests/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir
Lines 7 to 10 in 37b22cf
But it's actually dead -- nothing sets
_3
to anything, so that debug info node is useless.(I'm working on a PR that will remove always-uninitialized debug info like that
_3
, which is how I noticed this. So I opened this in case the debuginfo folks want this to work instead of just being dropped.)The text was updated successfully, but these errors were encountered: