This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/21828] [4.0/4.1 Regression] debug info omitted for uninitialized variables
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2005 01:56:51 -0000
- Subject: [Bug debug/21828] [4.0/4.1 Regression] debug info omitted for uninitialized variables
- References: <20050530184504.21828.bonzini@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mark at codesourcery dot com 2005-07-08 01:56 -------
Subject: Re: [4.0/4.1 Regression] debug info omitted for
uninitialized variables
wilson at specifix dot com wrote:
> I think you are just compounding the mistake created by Mark Mitchell's
> patch for PR 18556. I mentioned this in comment #8, which unfortunately
> didn't get sent to the gcc-bugs mailing list.
I agree that, in the abstract, the debug information should match the
source program. However, the problem was that we generated debug
information that referenced a non-existant symbol, which is clearly a
major problem. I'm not sure why the debug generator did that; perhaps
that's the real bug, as you suggest.
My change essentially restored the behavior of check_global_declarations
to its historical state; clearing DECL_RTL (as this code used to do) was
essentially supposed to turn off generation of debugging information for
the variable. If information was still emitted, that was somewhat by
accident, judging by the comment there.
Since this bug does not affect the C++ front end, it's clear that it's
possible to write a front end in which things work as expected.
So, there would be seem to be two ways to potential ways to fix things:
(1) change the debug generators, as you suggest; (2) change the C front end.
I'd be happy to help with either approach; this is certainly my fault,
independently of where the fix lies. However, as you've volunteered to
look at the debug generators, I'm going to leave this bug aside until
you report back. If you don't have time to look soon, would you please
let me know?
Thanks,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21828