public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "geoffk at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/27657] [4.2 regression] bogus undefined reference error to static var with -g and -O
Date: Mon, 28 Aug 2006 20:44:00 -0000	[thread overview]
Message-ID: <20060828204445.27402.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27657-12387@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]



------- 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=12037&action=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


  parent reply	other threads:[~2006-08-28 20:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18 13:35 [Bug tree-optimization/27657] New: " tbm at cyrius dot com
2006-05-18 16:50 ` [Bug tree-optimization/27657] " pinskia at gcc dot gnu dot org
2006-05-29  3:07 ` amodra at bigpond dot net dot au
2006-06-04 19:13 ` mmitchel at gcc dot gnu dot org
2006-06-29 19:27 ` pinskia at gcc dot gnu dot org
2006-08-07 11:59 ` hubicka at gcc dot gnu dot org
2006-08-10  7:36 ` pinskia at gcc dot gnu dot org
2006-08-27 22:33 ` [Bug middle-end/27657] " pinskia at gcc dot gnu dot org
2006-08-28 19:43 ` janis at gcc dot gnu dot org
2006-08-28 20:36 ` pinskia at gcc dot gnu dot org
2006-08-28 20:44 ` geoffk at gcc dot gnu dot org [this message]
2006-08-28 22:58 ` janis at gcc dot gnu dot org
2006-10-20  7:42 ` pinskia at gcc dot gnu dot org
2006-12-11 20:23 ` [Bug middle-end/27657] [4.2/4.3 " reichelt at gcc dot gnu dot org
2006-12-26 17:37 ` pinskia at gcc dot gnu dot org
2007-01-29 15:44 ` rguenth at gcc dot gnu dot org
2007-01-29 15:50 ` rguenth at gcc dot gnu dot org
2007-01-30 10:23 ` rguenth at gcc dot gnu dot org
2007-01-30 10:24 ` [Bug middle-end/27657] [4.2 " rguenth at gcc dot gnu dot org
2007-01-31 12:29 ` rguenth at gcc dot gnu dot org
2007-02-01 19:25 ` ismail at pardus dot org dot tr
2007-02-01 19:33 ` tbm at cyrius dot com
2007-02-01 19:51 ` ismail at pardus dot org dot tr
2007-02-04 15:28 ` rguenth at gcc dot gnu dot org
2007-02-04 15:30 ` rguenth at gcc dot gnu dot org
2007-02-04 17:52 ` tbm at cyrius dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060828204445.27402.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).