public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/45020] Useless DW_TAG_variable generated Date: Wed, 21 Jul 2010 18:00:00 -0000 [thread overview] Message-ID: <20100721180015.18255.qmail@sourceware.org> (raw) In-Reply-To: <bug-45020-87@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from jakub at gcc dot gnu dot org 2010-07-21 18:00 ------- Another testcase: extern int v; extern __typeof (v) v; extern __typeof (v) v; When the old extern decl isn't TREE_USED, it doesn't make it into debug info: case VAR_DECL: /* Ignore this VAR_DECL if it refers to a file-scope extern data object declaration and if the declaration was never even referenced from within this entire compilation unit. We suppress these DIEs in order to save space in the .debug section (by eliminating entries which are probably useless). Note that we must not suppress block-local extern declarations (whether used or not) because that would screw-up the debugger's name lookup mechanism and cause it to miss things which really ought to be in scope at a given point. */ if (DECL_EXTERNAL (decl) && !TREE_USED (decl)) return; I wonder if there is any point in keeping TREE_USED set on olddecl after merge_decls if olddecl was DECL_EXTERNAL. If there is, other options could be DECL_IGNORED_P on the DECL_EXTERNAL olddecl, or redirecting it to the newdecl. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roland at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45020
next prev parent reply other threads:[~2010-07-21 18:00 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-21 17:13 [Bug c/45020] New: " jakub at gcc dot gnu dot org 2010-07-21 18:00 ` jakub at gcc dot gnu dot org [this message] [not found] <bug-45020-4@http.gcc.gnu.org/bugzilla/> 2014-03-25 9:16 ` [Bug c/45020] " mpolacek at gcc dot gnu.org
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=20100721180015.18255.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: linkBe 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).