https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120916

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
when we replace a stmt with sth else we should drop it's location unless it
still computes the same value.  That is, on the consumer side I'd expect,
when I see

(gdb) s
 i++)       /* Line 9 */
(gdb) s
(gdb) p i

that at this point 'i' has the value after the increment.  This is usually
preserved as part of a DEBUG_STMT location.  The actual compute stmt should
end up with UNKNOWN_LOCATION if it was altered, so the question is how
we distribute the debug stmts location (or the BEGIN/END_STMT debug) to
actual instructions.

Reply via email to