[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-04 Thread rguenth at gcc dot gnu dot org


--- Comment #21 from rguenth at gcc dot gnu dot org  2007-02-04 15:28 
---
Subject: Bug 27657

Author: rguenth
Date: Sun Feb  4 15:27:53 2007
New Revision: 121576

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=121576
Log:
2007-02-04  Richard Guenther  [EMAIL PROTECTED]

Backport from mainline:
2007-01-30  Richard Guenther  [EMAIL PROTECTED]

PR middle-end/27657
* dwarf2out.c (reference_to_unused): Query varpool if the
variable was output.

* g++.dg/debug/pr27657.C: New testcase.

Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/debug/pr27657.C
  - copied unchanged from r121335,
trunk/gcc/testsuite/g++.dg/debug/pr27657.C
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/dwarf2out.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-04 Thread rguenth at gcc dot gnu dot org


--- Comment #22 from rguenth at gcc dot gnu dot org  2007-02-04 15:29 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-04 Thread tbm at cyrius dot com


--- Comment #23 from tbm at cyrius dot com  2007-02-04 17:52 ---
(In reply to comment #22)
 Fixed.

I can confirm this - with the exception of one case for which I filed a new
report: PR30700.


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-01 Thread ismail at pardus dot org dot tr


--- Comment #18 from ismail at pardus dot org dot tr  2007-02-01 19:25 
---
Any chance of a 4.2 backport ? Looks like varpool_node does not exist in 4.2
branch.


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-01 Thread tbm at cyrius dot com


--- Comment #19 from tbm at cyrius dot com  2007-02-01 19:32 ---
(In reply to comment #18)
 Any chance of a 4.2 backport ? Looks like varpool_node does not exist in 4.2
 branch.

I noticed this as well.  It's easy enough to fix:

14:20  richi tbm: sure s/varpool_/cgraph_varpool_/

Richi has already tested the patch on 4.2 so I assume he'll apply it soon.


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-02-01 Thread ismail at pardus dot org dot tr


--- Comment #20 from ismail at pardus dot org dot tr  2007-02-01 19:51 
---
(In reply to comment #19)
 (In reply to comment #18)
  Any chance of a 4.2 backport ? Looks like varpool_node does not exist in 4.2
  branch.
 
 I noticed this as well.  It's easy enough to fix:
 
 14:20  richi tbm: sure s/varpool_/cgraph_varpool_/
 
 Richi has already tested the patch on 4.2 so I assume he'll apply it soon.

Nice, thanks :)


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-01-31 Thread rguenth at gcc dot gnu dot org


--- Comment #17 from rguenth at gcc dot gnu dot org  2007-01-31 12:28 
---
*** Bug 30651 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||aanisimov at inbox dot ru


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2007-01-30 Thread rguenth at gcc dot gnu dot org


--- Comment #16 from rguenth at gcc dot gnu dot org  2007-01-30 10:23 
---
Fixed on the mainline.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to work|4.1.1 4.1.2 |4.1.1 4.1.2 4.3.0
Summary|[4.2/4.3 regression] bogus  |[4.2 regression] bogus
   |undefined reference error to|undefined reference error to
   |static var with -g and -O   |static var with -g and -O


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2006-10-20 Thread pinskia at gcc dot gnu dot org


--- Comment #10 from pinskia at gcc dot gnu dot org  2006-10-20 07:42 
---
*** Bug 29417 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||peter at chocky dot org


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2006-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2006-08-28 20:36 ---
(In reply to comment #6)
 The log message and the ChangeLog entry don't mention it, but this patch also
 modifies gcc/dwarf2out.c.

It was backed out right after the commit:
http://gcc.gnu.org/viewcvs?view=revrevision=112362

But that would mean it was caused by the revision which I had mentioned in
comment #5 as that revision put the code back in.


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2006-08-28 Thread geoffk at gcc dot gnu dot org


--- Comment #8 from geoffk at gcc dot gnu dot org  2006-08-28 20:44 ---

(In reply to comment #3)
 Created an attachment (id=12037)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12037action=view) [edit]
 patch
 
 It looks like we should bite the bullet and let cgraph code to output the 
 debug
 info  I am testing the attached patch
 
It looks like this patch will prevent the output of debug information for
variables that are optimized out, but that's wrong; the variables should be
visible to the user in the debugger even if they are optimized away.

I think the actual problem is that reference_to_unused in dwarf2out.c is
checking TREE_USED and expecting all used variables to be output, but that
doesn't seem to be happening in this case.  Perhaps there is something in
cgraph which can be called to ask if a variable is *really* going to be output?


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2006-08-28 Thread janis at gcc dot gnu dot org


--- Comment #9 from janis at gcc dot gnu dot org  2006-08-28 22:58 ---
I can confirm that the latest regression is from r112408.


-- 


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



[Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O

2006-08-27 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2006-08-27 22:32 ---
Janis,
  Can you do a regression hunt on this bug?
I almost think it was caused by revision 112408.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||janis at gcc dot gnu dot org
   Last reconfirmed|2006-05-29 03:07:05 |2006-08-27 22:32:58
   date||


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