https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105036
--- Comment #2 from Cristian Assaiante <assaiante at diag dot uniroma1.it> --- Indeed, we understand some information may be lost for the sake of keeping debug info correct. We reported this in the first place because, besides the missing variables, a wrong function (i.e., foo) is reported as executing in gdb, while the program is executing a line located in its caller (i.e., main). Perhaps, if it would be possible to fix the ranges as not to overlap, also the missing variables would become visible? Since DWARF info for i=0, j=0 is emitted but not in a way “retrievable” by gdb during source-level debugging.