public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/56740] New: duplicat DW_TAG_const_type
@ 2013-03-26 13:42 tromey at gcc dot gnu.org
  2014-02-25 11:34 ` [Bug debug/56740] " mark at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: tromey at gcc dot gnu.org @ 2013-03-26 13:42 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56740
           Summary: duplicat DW_TAG_const_type
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tromey@gcc.gnu.org


I used this source, from PR 55608:

static const char *a = "opq";
static const char b[8] = "rstuv";
static const char *c = b;
static const char *d = b + 3;
static const int e[] = { 1, 2, 3, 4 };
static int f[] = { 5, 6, 7 };
static const int *g = e;
static const int *h = e + 2;
static const int *i = f;
static const int *j = f + 2;

int
main ()
{
  const char *p = "abcd";
  const char *q = "efgh";
  const char r[] = "ijk\0lmn";
  const char *s = r;
  const char *t = b;
  const int *u = e;
  const int *v = e + 2;
  const int *w = f;
  const int *x = f + 2;
  return 0;
}


I compiled this with "gcc -g -O2", using git master gcc from
yesterday.

The DWARF contains some needless duplication:

 <1><fd>: Abbrev Number: 7 (DW_TAG_const_type)
    <fe>   DW_AT_type        : <0xe6>    

 <1><12f>: Abbrev Number: 7 (DW_TAG_const_type)
    <130>   DW_AT_type        : <0xe6>


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

* [Bug debug/56740] duplicat DW_TAG_const_type
  2013-03-26 13:42 [Bug debug/56740] New: duplicat DW_TAG_const_type tromey at gcc dot gnu.org
@ 2014-02-25 11:34 ` mark at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mark at gcc dot gnu.org @ 2014-02-25 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

Mark Wielaard <mark at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at gcc dot gnu.org

--- Comment #1 from Mark Wielaard <mark at gcc dot gnu.org> ---
Replicated with gcc (GCC) 4.9.0 20140219 (experimental)

 [    d7]    array_type
             type                 (ref4) [    d0]

 [    ee]    const_type
             type                 (ref4) [    d7]

 [   124]    const_type
             type                 (ref4) [    d7]

DIE ee is referenced from:

 [    66]      variable
               name                 (string) "r"
               decl_file            (data1) 1
               decl_line            (data1) 17
               type                 (ref4) [    ee]
               location             (exprloc)                 [   0] fbreg -96

That is const char r[] = "ijk\0lmn"; in main ().

DIE 124 is referenced from:

 [   111]    variable
             name                 (string) "b"
             decl_file            (data1) 1
             decl_line            (data1) 2
             type                 (ref4) [   124]
             location             (exprloc)               [   0] addr 0x400644
<b>

That is the global static const char b[8] = "rstuv";

Do those 2 really represent the same type?


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

end of thread, other threads:[~2014-02-25 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 13:42 [Bug debug/56740] New: duplicat DW_TAG_const_type tromey at gcc dot gnu.org
2014-02-25 11:34 ` [Bug debug/56740] " mark at gcc dot gnu.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).