public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/27574]  New: MIssing debug info at -O0
@ 2006-05-12 16:53 amylaar at gcc dot gnu dot org
  2006-05-12 16:58 ` [Bug debug/27574] " amylaar at gcc dot gnu dot org
                   ` (36 more replies)
  0 siblings, 37 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-05-12 16:53 UTC (permalink / raw)
  To: gcc-bugs

Compilation with -O0 -g no longer creates debug information for all variables.


-- 
           Summary: MIssing debug info at -O0
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] MIssing debug info at -O0
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
@ 2006-05-12 16:58 ` amylaar at gcc dot gnu dot org
  2006-05-12 17:02 ` amylaar at gcc dot gnu dot org
                   ` (35 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-05-12 16:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from amylaar at gcc dot gnu dot org  2006-05-12 16:58 -------
Created an attachment (id=11447)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11447&action=view)
test case

Compiled for either sh-elf or i686-pc-linux-gnu, currrent mainline cc1plus does
not generate any debug information for the variable 'problem'.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] MIssing debug info at -O0
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
  2006-05-12 16:58 ` [Bug debug/27574] " amylaar at gcc dot gnu dot org
@ 2006-05-12 17:02 ` amylaar at gcc dot gnu dot org
  2006-05-12 17:11 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a C++ constructor pinskia at gcc dot gnu dot org
                   ` (34 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-05-12 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from amylaar at gcc dot gnu dot org  2006-05-12 17:02 -------
Created an attachment (id=11448)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11448&action=view)
With the translation result for this file, the testcase can be linked

This file provides a definition of main and f so that when this file and
the test case are translated to an object file, they can be linked together
so that you can observe gdb showing - or rather not showing - the variable
named "problem".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
  2006-05-12 16:58 ` [Bug debug/27574] " amylaar at gcc dot gnu dot org
  2006-05-12 17:02 ` amylaar at gcc dot gnu dot org
@ 2006-05-12 17:11 ` pinskia at gcc dot gnu dot org
  2006-05-14 22:39 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in " mmitchel at gcc dot gnu dot org
                   ` (33 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-12 17:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-05-12 17:11 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-debug
      Known to fail|                            |4.1.0 4.2.0
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-12 17:11:45
               date|                            |
            Summary|MIssing debug info at -O0   |[4.1/4.2 Regression] MIssing
                   |for a constructor           |debug info at -O0 for a C++
                   |                            |constructor
   Target Milestone|---                         |4.1.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-12 17:11 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a C++ constructor pinskia at gcc dot gnu dot org
@ 2006-05-14 22:39 ` mmitchel at gcc dot gnu dot org
  2006-05-25  2:41 ` mmitchel at gcc dot gnu dot org
                   ` (32 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-14 22:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-14 22:39 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in " mmitchel at gcc dot gnu dot org
@ 2006-05-25  2:41 ` mmitchel at gcc dot gnu dot org
  2006-07-22 17:46 ` drow at gcc dot gnu dot org
                   ` (31 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-05-25 02:34 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-25  2:41 ` mmitchel at gcc dot gnu dot org
@ 2006-07-22 17:46 ` drow at gcc dot gnu dot org
  2006-07-22 20:05 ` [Bug debug/27574] [4.1 " drow at gcc dot gnu dot org
                   ` (30 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-07-22 17:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |drow at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-05-12 17:11:45         |2006-07-22 17:45:51
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-07-22 17:46 ` drow at gcc dot gnu dot org
@ 2006-07-22 20:05 ` drow at gcc dot gnu dot org
  2006-07-25 12:14 ` amylaar at gcc dot gnu dot org
                   ` (29 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-07-22 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from drow at gcc dot gnu dot org  2006-07-22 20:05 -------
I am not going to track down what did it, but something has fixed this on the
4.2 branch.  I can reproduce it on Debian's 4.1 branch snapshot.  If someone
wants to fix it on 4.1, it should probably be easy to use the regression hunter
to identify what patch caused the string "problem" to appear in the assembly
output.  It is probably something in the last two and a half months, since the
bug was reported, but I do not see any obvious candidates.


-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|drow at gcc dot gnu dot org |unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.1/4.2 Regression] MIssing|[4.1 Regression] MIssing
                   |debug info at -O0 for a     |debug info at -O0 for a
                   |local variable in a C++     |local variable in a C++
                   |constructor                 |constructor


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-07-22 20:05 ` [Bug debug/27574] [4.1 " drow at gcc dot gnu dot org
@ 2006-07-25 12:14 ` amylaar at gcc dot gnu dot org
  2006-07-25 13:28 ` drow at false dot org
                   ` (28 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-07-25 12:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from amylaar at gcc dot gnu dot org  2006-07-25 12:14 -------
(In reply to comment #5)
> I am not going to track down what did it, but something has fixed this on the
> 4.2 branch.  I can reproduce it on Debian's 4.1 branch snapshot.  If someone
> wants to fix it on 4.1, it should probably be easy to use the regression hunter
> to identify what patch caused the string "problem" to appear in the assembly
> output.  It is probably something in the last two and a half months, since the
> bug was reported, but I do not see any obvious candidates.
> 
If this is fixed on mainline, the fix must be rather recent; I see this still
failing with
r115417: GNU C++ version 4.2.0 20060713 (experimental).
What is the oldest gcc 4.2 version where you saw this work?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-07-25 12:14 ` amylaar at gcc dot gnu dot org
@ 2006-07-25 13:28 ` drow at false dot org
  2006-07-25 17:09 ` joern dot rennecke at st dot com
                   ` (27 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at false dot org @ 2006-07-25 13:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from drow at gcc dot gnu dot org  2006-07-25 13:27 -------
Subject: Re:  [4.1 Regression] MIssing debug info at -O0 for a local variable
in a C++ constructor

On Tue, Jul 25, 2006 at 12:14:46PM -0000, amylaar at gcc dot gnu dot org wrote:
> If this is fixed on mainline, the fix must be rather recent; I see this still
> failing with
> r115417: GNU C++ version 4.2.0 20060713 (experimental).
> What is the oldest gcc 4.2 version where you saw this work?

I tested it on HEAD on the day I posted (2006-07-22).  Could you check
whether that works for you, or it's something environmental?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-07-25 13:28 ` drow at false dot org
@ 2006-07-25 17:09 ` joern dot rennecke at st dot com
  2006-07-25 20:43 ` amylaar at gcc dot gnu dot org
                   ` (26 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: joern dot rennecke at st dot com @ 2006-07-25 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from joern dot rennecke at st dot com  2006-07-25 17:08 -------
Subject: Re:  [4.1 Regression] MIssing debug info at -O0 for a local variable
in a C++ constructor

drow at false dot org wrote:

>------- Comment #7 from drow at gcc dot gnu dot org  2006-07-25 13:27 -------
>Subject: Re:  [4.1 Regression] MIssing debug info at -O0 for a local variable
>in a C++ constructor
>
>On Tue, Jul 25, 2006 at 12:14:46PM -0000, amylaar at gcc dot gnu dot org wrote:
>  
>
>>If this is fixed on mainline, the fix must be rather recent; I see this still
>>failing with
>>r115417: GNU C++ version 4.2.0 20060713 (experimental).
>>What is the oldest gcc 4.2 version where you saw this work?
>>    
>>
>
>I tested it on HEAD on the day I posted (2006-07-22).  Could you check
>whether that works for you, or it's something environmental?
>  
>
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?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-07-25 17:09 ` joern dot rennecke at st dot com
@ 2006-07-25 20:43 ` amylaar at gcc dot gnu dot org
  2006-07-26  3:52 ` drow at false dot org
                   ` (25 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-07-25 20:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from amylaar at gcc dot gnu dot org  2006-07-25 20:43 -------
Created an attachment (id=11938)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11938&action=view)
g++.dg/debug test case

As far as I can tell, as a g++.dg/debug test case, this passes for stabs, but
fails for dwarf.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-07-25 20:43 ` amylaar at gcc dot gnu dot org
@ 2006-07-26  3:52 ` drow at false dot org
  2006-07-26 12:30 ` amylaar at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at false dot org @ 2006-07-26  3:52 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2006-07-26  3:52 ` drow at false dot org
@ 2006-07-26 12:30 ` amylaar at gcc dot gnu dot org
  2006-07-26 13:59 ` drow at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-07-26 12:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from amylaar at gcc dot gnu dot org  2006-07-26 12:30 -------
(In reply to comment #10)
 > If I had to guess I'd say that this was a C++ front end problem, or
> maybe a recent change in cgraph.

It can't have been a particularly recent change, since it already failed
with GNU C++ version 4.1.0 20050323 (experimental) (sh-elf) .
It worked with GNU C++ version 4.1.0 20050314 (experimental) (sh-elf) .


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2006-07-26 12:30 ` amylaar at gcc dot gnu dot org
@ 2006-07-26 13:59 ` drow at gcc dot gnu dot org
  2006-07-27 17:29 ` [Bug debug/27574] [4.1/4.2 " amylaar at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-07-26 13:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from drow at gcc dot gnu dot org  2006-07-26 13:59 -------
It is a cgraph change.  There were several patches affecting cgraph_remove_node
during this time period; it was probably one of those.  The problem is that we
throw away the body of the abstract copy of the constructor, before we get
around to emitting debug information for it.

There's already a debug hook at what looks like the right time.  It's just not
used for dwarf2: deferred_inline_function.  It was replaced by
outlining_inline_function, which is called only when we know we'll generate a
concrete instance.

There's a couple of things we could do:
  - Not throw away the body.
  - Try to generate the debug info earlier, and then prune it if it isn't
needed.
  - Try to treat one of the concrete clones (whose bodies we need) as the
origin.

I think the first one is going to be safest for now.

I don't really see how to do it.  Jan, do you have a suggestion?


-- 

drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2006-07-26 13:59 ` drow at gcc dot gnu dot org
@ 2006-07-27 17:29 ` amylaar at gcc dot gnu dot org
  2006-07-27 20:12 ` drow at false dot org
                   ` (21 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-07-27 17:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from amylaar at gcc dot gnu dot org  2006-07-27 17:29 -------
(In reply to comment #12)
> It is a cgraph change.  There were several patches affecting cgraph_remove_node
> during this time period; it was probably one of those.

The problem appeared from r96653 to r96654; AFAICT this is the gcc-patches
posting for the associated patch:
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01709.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2006-07-27 17:29 ` [Bug debug/27574] [4.1/4.2 " amylaar at gcc dot gnu dot org
@ 2006-07-27 20:12 ` drow at false dot org
  2006-08-25 18:57 ` drow at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at false dot org @ 2006-07-27 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from drow at gcc dot gnu dot org  2006-07-27 20:12 -------
Subject: Re:  [4.1/4.2 Regression] MIssing debug info at -O0 for a local
variable in a C++ constructor

On Thu, Jul 27, 2006 at 05:29:38PM -0000, amylaar at gcc dot gnu dot org wrote:
> The problem appeared from r96653 to r96654; AFAICT this is the gcc-patches
> posting for the associated patch:
> http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01709.html

Jan and Dan Berlin suggested that the right fix for this bug might be
to not register the uncloned constructor with cgraph, only the clones.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2006-07-27 20:12 ` drow at false dot org
@ 2006-08-25 18:57 ` drow at gcc dot gnu dot org
  2007-02-14  9:12 ` [Bug debug/27574] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: drow at gcc dot gnu dot org @ 2006-08-25 18:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from drow at gcc dot gnu dot org  2006-08-25 18:57 -------
I don't think I can sort this one out.  I think the easiest solution will be to
check when marking a function as reachable whether it has an abstract origin,
and if so set a flag in the abstract origin preventing its body from being
killed, but I can't keep track of all the other similar-but-not-quite-the-same
flags in cgraph.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2006-08-25 18:57 ` drow at gcc dot gnu dot org
@ 2007-02-14  9:12 ` mmitchel at gcc dot gnu dot org
  2008-01-13 13:51 ` pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:12 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2007-02-14  9:12 ` [Bug debug/27574] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2008-01-13 13:51 ` pinskia at gcc dot gnu dot org
  2008-01-13 14:46 ` rguenth at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-13 13:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from pinskia at gcc dot gnu dot org  2008-01-13 13:02 -------
*** Bug 34767 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |toomas at rosin dot pri dot
                   |                            |ee


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2008-01-13 13:51 ` pinskia at gcc dot gnu dot org
@ 2008-01-13 14:46 ` rguenth at gcc dot gnu dot org
  2008-02-15 21:28 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-13 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2008-01-13 14:04 -------
Honza, can you have a look here?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2008-01-13 14:46 ` rguenth at gcc dot gnu dot org
@ 2008-02-15 21:28 ` pinskia at gcc dot gnu dot org
  2008-02-15 21:30 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-15 21:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from pinskia at gcc dot gnu dot org  2008-02-15 21:27 -------
*** Bug 35212 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |connerta at
                   |                            |appliedbiosystems dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2008-02-15 21:28 ` pinskia at gcc dot gnu dot org
@ 2008-02-15 21:30 ` pinskia at gcc dot gnu dot org
  2008-04-01  7:12 ` [Bug debug/27574] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-15 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from pinskia at gcc dot gnu dot org  2008-02-15 21:29 -------
I don't know if this is the correct patch but we made this for the PS3
toolchain:
Index: gcc/cgraph.c
===================================================================
--- gcc/cgraph.c        (revision 2280)
+++ gcc/cgraph.c        (working copy)
@@ -476,14 +476,16 @@
       if (!n->next_clone && !n->global.inlined_to
          && (cgraph_global_info_ready
              && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl))))
-       kill_body = true;
+       {
+         DECL_INITIAL (node->decl) = error_mark_node;
+         kill_body = true;
+       }
     }

   if (kill_body && !dump_enabled_p (TDI_tree_all) && flag_unit_at_a_time)
     {
       DECL_SAVED_TREE (node->decl) = NULL;
       DECL_STRUCT_FUNCTION (node->decl) = NULL;
-      DECL_INITIAL (node->decl) = error_mark_node;
     }
   cgraph_n_nodes--;
   /* Do not free the structure itself so the walk over chain can continue.  */


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2008-02-15 21:30 ` pinskia at gcc dot gnu dot org
@ 2008-04-01  7:12 ` pinskia at gcc dot gnu dot org
  2008-04-23 22:34 ` ian at airs dot com
                   ` (13 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-01  7:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from pinskia at gcc dot gnu dot org  2008-04-01 07:11 -------
I am just going to test this patch and relook at it when the test is finished
but I can see what the issue is.  at -O0 we have unit-at-a-time on.  Though
there is still an issue if we don't have any clones, I think.  I will relook
more into it after the bootstrap/test finishes.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-07-22 17:45:51         |2008-04-01 07:11:38
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (22 preceding siblings ...)
  2008-04-01  7:12 ` [Bug debug/27574] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
@ 2008-04-23 22:34 ` ian at airs dot com
  2008-04-23 23:09 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: ian at airs dot com @ 2008-04-23 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from ian at airs dot com  2008-04-23 22:33 -------
A patch like this seems like a decent workaround to me.

Honza, any opinions on this approach?

Ian

Index: cgraph.c
===================================================================
--- cgraph.c    (revision 134283)
+++ cgraph.c    (working copy)
@@ -615,6 +615,14 @@ cgraph_remove_node (struct cgraph_node *
        kill_body = true;
     }

+  /* We don't release the body of abstract functions, because they may
+     be needed when emitting debugging information.  In particular
+     this will happen for C++ constructors/destructors.  FIXME:
+     Ideally we would check to see whether there are any reachable
+     functions whose DECL_ABSTRACT_ORIGIN points to this decl.  */
+  if (DECL_ABSTRACT (node->decl))
+    kill_body = false;
+
   if (kill_body && flag_unit_at_a_time)
     cgraph_release_function_body (node);
   node->decl = NULL;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.1/4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (23 preceding siblings ...)
  2008-04-23 22:34 ` ian at airs dot com
@ 2008-04-23 23:09 ` pinskia at gcc dot gnu dot org
  2008-07-04 21:23 ` [Bug debug/27574] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-23 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from pinskia at gcc dot gnu dot org  2008-04-23 23:08 -------
(In reply to comment #21)
> A patch like this seems like a decent workaround to me.
> 
> Honza, any opinions on this approach?

This looks good to me also.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (24 preceding siblings ...)
  2008-04-23 23:09 ` pinskia at gcc dot gnu dot org
@ 2008-07-04 21:23 ` jsm28 at gcc dot gnu dot org
  2008-10-07 20:52 ` dodji at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from jsm28 at gcc dot gnu dot org  2008-07-04 21:22 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 Regression]|[4.2/4.3/4.4 Regression]
                   |MIssing debug info at -O0   |MIssing debug info at -O0
                   |for a local variable in a   |for a local variable in a
                   |C++ constructor             |C++ constructor
   Target Milestone|4.1.3                       |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (25 preceding siblings ...)
  2008-07-04 21:23 ` [Bug debug/27574] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-10-07 20:52 ` dodji at gcc dot gnu dot org
  2008-11-06 10:26 ` dodji at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-10-07 20:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu dot org
         AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-04-01 07:11:38         |2008-10-07 20:51:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (26 preceding siblings ...)
  2008-10-07 20:52 ` dodji at gcc dot gnu dot org
@ 2008-11-06 10:26 ` dodji at gcc dot gnu dot org
  2008-11-12 22:00 ` dodji at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-06 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from dodji at gcc dot gnu dot org  2008-11-06 10:24 -------
So the patch http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00133.html that fixes
this got accepted. So this might end up in trunk soon.

For 4.3 and 4.2 we might want to apply Ian's patch as it is less disruptive.

See http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01981.html .


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3/4.4 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (27 preceding siblings ...)
  2008-11-06 10:26 ` dodji at gcc dot gnu dot org
@ 2008-11-12 22:00 ` dodji at gcc dot gnu dot org
  2008-11-13 10:57 ` [Bug debug/27574] [4.2/4.3 " dodji at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-12 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from dodji at gcc dot gnu dot org  2008-11-12 21:59 -------
Subject: Bug 27574

Author: dodji
Date: Wed Nov 12 21:57:44 2008
New Revision: 141807

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141807
Log:
gcc/ChangeLog:
2008-11-12  Dodji Seketeli  <dodji@redhat.com>

        PR debug/27574
        * cgraph.h: New abstract_and_needed member to struct cgraph_node.
        * cgraphunit.c (cgraph_analyze_functions): Flag abstract functions
        - which clones are reachable - as "abstract and needed".
        * cgraph.c (cgraph_release_function_body):  If a node is "abstract and
needed",
        do not release its DECL_INITIAL() content because that will be needed
to emit
        debug info.

gcc/testsuite/ChangeLog:
2008-11-12  Dodji Seketeli  <dodji@redhat.com>

        PR debug/27574
        * g++.dg/debug/dwarf2/local-var-in-contructor.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraph.c
    trunk/gcc/cgraph.h
    trunk/gcc/cgraphunit.c
    trunk/gcc/final.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (28 preceding siblings ...)
  2008-11-12 22:00 ` dodji at gcc dot gnu dot org
@ 2008-11-13 10:57 ` dodji at gcc dot gnu dot org
  2008-11-14 13:29 ` dodji at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-13 10:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from dodji at gcc dot gnu dot org  2008-11-13 10:56 -------
Subject: Bug 27574

Author: dodji
Date: Thu Nov 13 10:55:01 2008
New Revision: 141819

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141819
Log:
Fix ChangeLog entry:
        PR debug/27574
        * cgraph.h: New abstract_and_needed member to struct cgraph_node.
        * cgraphunit.c (cgraph_analyze_functions): Flag abstract functions
        - which clones are reachable - as "abstract and needed".
        * cgraph.c (cgraph_release_function_body):  If a node is
        "abstract and needed", do not release its DECL_INITIAL() content
        that will be needed to emit debug info.


Modified:
    trunk/gcc/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (29 preceding siblings ...)
  2008-11-13 10:57 ` [Bug debug/27574] [4.2/4.3 " dodji at gcc dot gnu dot org
@ 2008-11-14 13:29 ` dodji at gcc dot gnu dot org
  2008-11-19  0:18 ` dodji at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-14 13:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from dodji at gcc dot gnu dot org  2008-11-14 13:28 -------
Subject: Bug 27574

Author: dodji
Date: Fri Nov 14 13:26:59 2008
New Revision: 141858

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141858
Log:
gcc/ChangeLog:
        PR debug/27574
        * cgraph.h: New abstract_and_needed member to struct cgraph_node.
        * cgraphunit.c (cgraph_analyze_functions): Flag abstract functions
        -which clones are reachable - as "abstract and needed".
        * cgraph.c (cgraph_release_function_body):  If a node is
        "abstract and needed", do not release its DECL_INITIAL() content
        will be needed to emit debug info.

gcc/testsuite/ChangeLog:
        PR debug/27574
        * g++.dg/debug/dwarf2/local-var-in-contructor.C: New test.


Added:
   
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/cgraph.c
    branches/gcc-4_3-branch/gcc/cgraph.h
    branches/gcc-4_3-branch/gcc/cgraphunit.c
    branches/gcc-4_3-branch/gcc/final.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (30 preceding siblings ...)
  2008-11-14 13:29 ` dodji at gcc dot gnu dot org
@ 2008-11-19  0:18 ` dodji at gcc dot gnu dot org
  2008-11-19  0:22 ` dodji at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-19  0:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #28 from dodji at gcc dot gnu dot org  2008-11-19 00:17 -------
Subject: Bug 27574

Author: dodji
Date: Wed Nov 19 00:15:52 2008
New Revision: 141984

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141984
Log:
gcc/ChangeLog:
2008-11-14  Dodji Seketeli  <dodji@redhat.com>

        PR c++/27574
        * gcc/cgraph.c (cgraph_remove_node): Do not remove the body of
          abstract functions. It might be useful to emit debugging
          information. This is a patch from Ian Lance Taylor.
        * cgraphunit.c (cgraph_optimize): Do not cry when bodies of abstract
          functions are still around. They are useful to output debug info.

gcc/testsuite/ChangeLog
2008-11-14  Dodji Seketeli  <dodji@redhat.com>

        PR c++/27574
        * testsuite/g++.dg/debug/dwarf2/dwarf2.exp: Backport this here from
        gcc-4_3-branch.
        * g++.dg/debug/dwarf2/local-var-in-contructor.C: New testcase.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/dwarf2/
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
   
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/cgraph.c
    branches/gcc-4_2-branch/gcc/cgraphunit.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (31 preceding siblings ...)
  2008-11-19  0:18 ` dodji at gcc dot gnu dot org
@ 2008-11-19  0:22 ` dodji at gcc dot gnu dot org
  2008-12-09 18:27 ` amylaar at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-19  0:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #29 from dodji at gcc dot gnu dot org  2008-11-19 00:21 -------
Fixed in trunk, 4.3 and 4.2 branch.


-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (32 preceding siblings ...)
  2008-11-19  0:22 ` dodji at gcc dot gnu dot org
@ 2008-12-09 18:27 ` amylaar at gcc dot gnu dot org
  2008-12-09 18:50 ` amylaar at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2008-12-09 18:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #30 from amylaar at gcc dot gnu dot org  2008-12-09 18:22 -------
I think the testcase pr27574.C should be added to the testsuite before
closing this bug.


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (33 preceding siblings ...)
  2008-12-09 18:27 ` amylaar at gcc dot gnu dot org
@ 2008-12-09 18:50 ` amylaar at gcc dot gnu dot org
  2009-04-29 15:08 ` pinskia at gcc dot gnu dot org
  2009-04-29 15:09 ` pinskia at gcc dot gnu dot org
  36 siblings, 0 replies; 38+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2008-12-09 18:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #31 from amylaar at gcc dot gnu dot org  2008-12-09 18:48 -------
Sorry, I only checked for the presence of the original testcase name in
the testsuite, and thus missed the fact that there is a new test called
local-var-in-contructor.C [sic] .


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (34 preceding siblings ...)
  2008-12-09 18:50 ` amylaar at gcc dot gnu dot org
@ 2009-04-29 15:08 ` pinskia at gcc dot gnu dot org
  2009-04-29 15:09 ` pinskia at gcc dot gnu dot org
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-29 15:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.0.2 4.4.0 4.3.3           |4.0.2 4.4.0
   Target Milestone|4.2.5                       |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Bug debug/27574] [4.2/4.3 Regression] MIssing debug info at -O0 for a local variable in a C++ constructor
  2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
                   ` (35 preceding siblings ...)
  2009-04-29 15:08 ` pinskia at gcc dot gnu dot org
@ 2009-04-29 15:09 ` pinskia at gcc dot gnu dot org
  36 siblings, 0 replies; 38+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-29 15:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #32 from pinskia at gcc dot gnu dot org  2009-04-29 15:09 -------
*** Bug 39961 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thb at openoffice dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2009-04-29 15:09 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-12 16:53 [Bug debug/27574] New: MIssing debug info at -O0 amylaar at gcc dot gnu dot org
2006-05-12 16:58 ` [Bug debug/27574] " amylaar at gcc dot gnu dot org
2006-05-12 17:02 ` amylaar at gcc dot gnu dot org
2006-05-12 17:11 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a C++ constructor pinskia at gcc dot gnu dot org
2006-05-14 22:39 ` [Bug debug/27574] [4.1/4.2 Regression] MIssing debug info at -O0 for a local variable in " mmitchel at gcc dot gnu dot org
2006-05-25  2:41 ` mmitchel at gcc dot gnu dot org
2006-07-22 17:46 ` drow at gcc dot gnu dot org
2006-07-22 20:05 ` [Bug debug/27574] [4.1 " drow at gcc dot gnu dot org
2006-07-25 12:14 ` amylaar at gcc dot gnu dot org
2006-07-25 13:28 ` drow at false dot org
2006-07-25 17:09 ` joern dot rennecke at st dot com
2006-07-25 20:43 ` amylaar at gcc dot gnu dot org
2006-07-26  3:52 ` drow at false dot org
2006-07-26 12:30 ` amylaar at gcc dot gnu dot org
2006-07-26 13:59 ` drow at gcc dot gnu dot org
2006-07-27 17:29 ` [Bug debug/27574] [4.1/4.2 " amylaar at gcc dot gnu dot org
2006-07-27 20:12 ` drow at false dot org
2006-08-25 18:57 ` drow at gcc dot gnu dot org
2007-02-14  9:12 ` [Bug debug/27574] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2008-01-13 13:51 ` pinskia at gcc dot gnu dot org
2008-01-13 14:46 ` rguenth at gcc dot gnu dot org
2008-02-15 21:28 ` pinskia at gcc dot gnu dot org
2008-02-15 21:30 ` pinskia at gcc dot gnu dot org
2008-04-01  7:12 ` [Bug debug/27574] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
2008-04-23 22:34 ` ian at airs dot com
2008-04-23 23:09 ` pinskia at gcc dot gnu dot org
2008-07-04 21:23 ` [Bug debug/27574] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-10-07 20:52 ` dodji at gcc dot gnu dot org
2008-11-06 10:26 ` dodji at gcc dot gnu dot org
2008-11-12 22:00 ` dodji at gcc dot gnu dot org
2008-11-13 10:57 ` [Bug debug/27574] [4.2/4.3 " dodji at gcc dot gnu dot org
2008-11-14 13:29 ` dodji at gcc dot gnu dot org
2008-11-19  0:18 ` dodji at gcc dot gnu dot org
2008-11-19  0:22 ` dodji at gcc dot gnu dot org
2008-12-09 18:27 ` amylaar at gcc dot gnu dot org
2008-12-09 18:50 ` amylaar at gcc dot gnu dot org
2009-04-29 15:08 ` pinskia at gcc dot gnu dot org
2009-04-29 15:09 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).