https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107414
--- Comment #4 from Ulrich Drepper <drepper.fsp+rhbz at gmail dot com> --- Actually, Jakub was right. This is a gdb issue. The gdb maintainers pointed me to the trunk version and this indeed works with this simple code sequence. There might have been a bug as in 107012 but even after that fix gdb didn't handle the dwarf data correctly before a recent commit.