https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
Martin Liška changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #7 from qinzhao at gcc dot gnu.org ---
I have just created a bug to record the debugging issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92386
(In reply to Jakub Jelinek from comment #6)
> Feel free to open an issue against GDB o
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #6 from Jakub Jelinek ---
Feel free to open an issue against GDB or GCC< wherever the debug info issue is
e.g. for the #c4 testcase. Because certainly I see 0 as the value of v even
when it should be 1 or 2.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #5 from qinzhao at gcc dot gnu.org ---
Okay, I see. thank you for explanation.
I will close this one as not a bug.
(In reply to Jakub Jelinek from comment #4)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #4 from Jakub Jelinek ---
This boils down to
int
main ()
{
volatile int v = 0;
{
v++;
v++;
volatile int v = 4;
v++;
}
}
>From what I see, this is handled correctly in the generated code, so it is just
the debuggi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #3 from Jakub Jelinek ---
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).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
--- Comment #2 from qinzhao at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #1)
> Why is this a major issue? Just variable shadowing, so something that with
> -Wshadow* compiler will warn, but nothing more, the code is well defined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92382
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1