This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
- From: "drow at false dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2006 03:52:08 -0000
- Subject: [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
- References: <bug-27574-5394@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from drow at gcc dot gnu dot org 2006-07-26 03:52 -------
Subject: Re: [4.1 Regression] MIssing debug info at -O0 for a local variable
in a C++ constructor
On Tue, Jul 25, 2006 at 05:08:18PM -0000, joern dot rennecke at st dot com
wrote:
> When I compile the testcase (using -g -O0) with a cc1plus built from todays
> sources (r115734), a test search for "problem" in the .s file comes up
> empty.
> OTOH, both a native and a cross build eventually failed.
>
> Can you find out the exact version of gcc that you tested?
Now it fails. What the heck?
The problem is that an abstract instance of 'problem' is never emitted.
For the two concrete instances we try to reference the abstract copy
but there isn't one. The variable is emitted, but without a name.
The first abstract instance of A::A is a declaration. Later a
"definition" (still abstract) is seen. But its DECL_INITIAL is
error_mark_node!
If I had to guess I'd say that this was a C++ front end problem, or
maybe a recent change in cgraph. I don't have time to debug it further
right now. The abstract copy of the function has to have a body, or
dwarf2out has no structure with which to describe the local variables.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574