public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/14168] New: Unneeded DIEs output for imported declarations
@ 2004-02-17  4:54 drow at gcc dot gnu dot org
  2004-02-17  5:06 ` [Bug debug/14168] " pinskia at gcc dot gnu dot org
  2004-06-06 18:16 ` dberlin at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-02-17  4:54 UTC (permalink / raw)
  To: gcc-bugs

This code:
typedef int ptrdiff_t;

namespace std
{
  using ::ptrdiff_t;
}

causes DIEs to be output for ptrdiff_t, std, std::ptrdiff_t, and int.  None of these
are necessary.  Ideally DW_TAG_imported_declaration would be pruned if !TREE_USED;
we have no way to find out if the copy in std is used or not.

This example highlights how schizophrenic we are about when to emit things.  We
go out of our way to emit as little as possible (way too little) for some things,
but anything imported into anything else is output, and it's not clear what use
DW_TAG_imported_declaration has if we don't do that.  There are imports all over
the standard headers and this causes lots of wasted duplicate DIEs.

-- 
           Summary: Unneeded DIEs output for imported declarations
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug debug/14168] Unneeded DIEs output for imported declarations
  2004-02-17  4:54 [Bug debug/14168] New: Unneeded DIEs output for imported declarations drow at gcc dot gnu dot org
@ 2004-02-17  5:06 ` pinskia at gcc dot gnu dot org
  2004-06-06 18:16 ` dberlin at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-17  5:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-17 05:06 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-17 05:06:23
               date|                            |


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


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

* [Bug debug/14168] Unneeded DIEs output for imported declarations
  2004-02-17  4:54 [Bug debug/14168] New: Unneeded DIEs output for imported declarations drow at gcc dot gnu dot org
  2004-02-17  5:06 ` [Bug debug/14168] " pinskia at gcc dot gnu dot org
@ 2004-06-06 18:16 ` dberlin at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2004-06-06 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2004-06-06 18:16 -------
Part of the problem is that we never set TREE_USED on NAMESPACE_DECL, or the imported decls.

I tried the obvious simple fix for the problem in this bug, which was to not emit NAMESPACE_DECL if !
TREE_USED, and not emit imported declarations if !TREE_USED, but netiher work because neither ever 
has TREE_USED set.


-- 


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


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

end of thread, other threads:[~2004-06-06 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-17  4:54 [Bug debug/14168] New: Unneeded DIEs output for imported declarations drow at gcc dot gnu dot org
2004-02-17  5:06 ` [Bug debug/14168] " pinskia at gcc dot gnu dot org
2004-06-06 18:16 ` dberlin 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).