From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12230 invoked by alias); 26 Jul 2006 03:52:16 -0000 Received: (qmail 12201 invoked by alias); 26 Jul 2006 03:52:08 -0000 Date: Wed, 26 Jul 2006 03:52:00 -0000 Message-ID: <20060726035208.12200.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "drow at false dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg01979.txt.bz2 List-Id: ------- 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