https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102534
--- Comment #4 from Ben Woodard <woodard at redhat dot com> --- There continues to be an instruction after the completion of the inlining, the next instruction in the sequence, At the time when the inlining occurs why can’t the .loc 1 6 1 be placed there as part of the process of folding the instructions for the inlined code into the calling function. This is analogous to the placement of loc 1 5 4 for the first first line inside the function in every location where the the function is called. It just gets attached to the next instruction after the function’s completion. In other words we argue that .loc 1 6 1 should be attached to the instructions at: 401081 401094 4010a4 Another case that we would like to see work even though it optimizes to no machine instructions which we tried to include in this fragment of source is the case where we call a function that gets completely optimized away to a call for another function. Even when that happens, we would like the residue of its former existence to be in the line map matrix. That is why we included both a static and a potentially external function, were this to be compiled as PIE then the unused function could still be called. We thought that the two situations while highly related, were different. Also you didn’t explain why the main() function at line 25 did not get a breakpoint associated with the closing brace for it. It does have a ret instruction and it is not inlined. If that needs to be a separate PR, I do not mind splitting it off.