[Bug debug/52935] Unnecessary DW_TAG_pointer_type DIEs in C++

mark at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 16 07:56:00 GMT 2012


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

--- Comment #1 from Mark Wielaard <mark at gcc dot gnu.org> 2012-04-16 07:55:35 UTC ---
GNU C 4.6.3 20120306 (Red Hat 4.6.3-2) -mtune=generic -march=x86-64 -g
produces:

 [    1d]    structure_type
             name                 (string) "S"
             byte_size            (data1) 8
             decl_file            (data1) 1
             decl_line            (data1) 1
             sibling              (ref4) [    32]
 [    27]      member
               name                 (string) "a"
               decl_file            (data1) 1
               decl_line            (data1) 1
               type                 (ref4) [    32]
               data_member_location (data1) 0
 [    32]    pointer_type
             byte_size            (data1) 8
             type                 (ref4) [    1d]
 [    38]    structure_type
             name                 (string) "T"
             byte_size            (data1) 8
             decl_file            (data1) 1
             decl_line            (data1) 1
             sibling              (ref4) [    4d]
 [    42]      member
               name                 (string) "b"
               decl_file            (data1) 1
               decl_line            (data1) 1
               type                 (ref4) [    32]
               data_member_location (data1) 0
 [    4d]    variable
             name                 (string) "t"
             decl_file            (data1) 1
             decl_line            (data1) 1
             type                 (ref4) [    38]
             external             (flag_present) Yes
             location             (exprloc) 
              [   0] addr .bss+0

Both DIE 27 and 42 use the same type DIE 32.

While GNU C++ 4.6.3 20120306 (Red Hat 4.6.3-2) -mtune=generic -march=x86-64 -g
gives:

 [    1d]    structure_type
             name                 (string) "S"
             byte_size            (data1) 8
             decl_file            (data1) 1
             decl_line            (data1) 1
             sibling              (ref4) [    32]
 [    27]      member
               name                 (string) "a"
               decl_file            (data1) 1
               decl_line            (data1) 1
               type                 (ref4) [    32]
               data_member_location (data1) 0
 [    32]    pointer_type
             byte_size            (data1) 8
             type                 (ref4) [    1d]
 [    38]    structure_type
             name                 (string) "T"
             byte_size            (data1) 8
             decl_file            (data1) 1
             decl_line            (data1) 1
             sibling              (ref4) [    4d]
 [    42]      member
               name                 (string) "b"
               decl_file            (data1) 1
               decl_line            (data1) 1
               type                 (ref4) [    4d]
               data_member_location (data1) 0
 [    4d]    pointer_type
             byte_size            (data1) 8
             type                 (ref4) [    1d]
 [    53]    variable
             name                 (string) "t"
             decl_file            (data1) 1
             decl_line            (data1) 1
             type                 (ref4) [    38]
             external             (flag_present) Yes
             location             (exprloc) 
              [   0] addr .bss+0 <t>

Type DIEs 32 and 4d are the same, the first is used by DIE 27, the second by
DIE 42.



More information about the Gcc-bugs mailing list