https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Most likely just GDB doesn't handle it correctly, or a bug in what we emit as debug info for it (for -O0 it wouldn't surprise me, as we don't really track the scope of the variable).