public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/45020] Useless DW_TAG_variable generated
[not found] <bug-45020-4@http.gcc.gnu.org/bugzilla/>
@ 2014-03-25 9:16 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-25 9:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45020
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think this has been fixed in r182027 as a fix for PR51410. I tried all
testcases mentioned here and see no duplicate DW_TAG_variables.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/45020] Useless DW_TAG_variable generated
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
0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-21 18:00 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-25 9:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-45020-4@http.gcc.gnu.org/bugzilla/>
2014-03-25 9:16 ` [Bug c/45020] Useless DW_TAG_variable generated mpolacek at gcc dot gnu.org
2010-07-21 17:13 [Bug c/45020] New: " jakub at gcc dot gnu dot org
2010-07-21 18:00 ` [Bug c/45020] " jakub 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).