public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers
@ 2012-01-22 19:37 jan.kratochvil at redhat dot com
  2012-01-23 10:51 ` [Bug debug/51950] [4.6/4.7 " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-01-22 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51950
           Summary: [4.6 Regression] fdebug-types-section regression for
                    member pointers
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jan.kratochvil@redhat.com
                CC: ccoutant@gcc.gnu.org, dodji@gcc.gnu.org
            Target: x86_64-unknown-linux-gnu


GDB testsuite:
 ptype F
-type = void (S::*)(S * const)
-(gdb) PASS: gdb.cp/temargs.exp: test type of F in k2_m
+type = void (S::*)(S *, S * const)
+(gdb) FAIL: gdb.cp/temargs.exp: test type of F in k2_m

UNSUPPORTED: gcc (GCC) 4.4.7 20120122 (prerelease) - no DWARF-4
PASS: gcc (GCC) 4.5.4 20120122 (prerelease)
FAIL: gcc (GCC) 4.6.3 20120122 (prerelease) (-fdebug-types-section)
FAIL: gcc (GCC) 4.7.0 20120122 (experimental) -fdebug-types-section
PASS: gcc (GCC) 4.7.0 20120122 (experimental) -fno-debug-types-section

------------------------------------------------------------------------------
struct S {
  void somefunc() {}
};
template<void (S::*F) ()>
struct K2 {
  void k2_m () {} /* line 6 */
};
K2<&S::somefunc> k2;
int main () {
  k2.k2_m ();
  return 0;
}
------------------------------------------------------------------------------
g++ -gdwarf-4 -fdebug-types-section
------------------------------------------------------------------------------
  Compilation Unit @ offset 0x0:
   Signature:     a663cce782d1a2b9
   Type Offset:   0x1d
 <0><17>: Abbrev Number: 1 (DW_TAG_type_unit)
 <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type)
 <2><25>: Abbrev Number: 3 (DW_TAG_member)
    <26>   DW_AT_name        : (indirect string, offset: 0xca): __pfn   
    <2c>   DW_AT_type        : <0x3e>   
 <2><31>: Abbrev Number: 3 (DW_TAG_member)
    <32>   DW_AT_name        : (indirect string, offset: 0x26): __delta 
 <1><3e>: Abbrev Number: 4 (DW_TAG_pointer_type)
    <40>   DW_AT_type        : <0x4b>   
 <1><4b>: Abbrev Number: 6 (DW_TAG_subroutine_type)
    <4c>   DW_AT_object_pointer: <0x59> 
 <2><54>: Abbrev Number: 7 (DW_TAG_formal_parameter)
    <55>   DW_AT_type        : <0x5f>   
    <59>   DW_AT_artificial  : 1        
 <2><59>: Abbrev Number: 7 (DW_TAG_formal_parameter)
    <5a>   DW_AT_type        : <0x5f>   
    <5e>   DW_AT_artificial  : 1        
 <1><5f>: Abbrev Number: 8 (DW_TAG_pointer_type)
    <61>   DW_AT_type        : signature: d93bf8a6a14b2dca      

The DIEs <0x54> is excessive.


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

* [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
@ 2012-01-23 10:51 ` rguenth at gcc dot gnu.org
  2012-01-23 11:29 ` jan.kratochvil at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-23 10:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.5.3
   Target Milestone|---                         |4.6.3
            Summary|[4.6 Regression]            |[4.6/4.7 Regression]
                   |fdebug-types-section        |fdebug-types-section
                   |regression for member       |regression for member
                   |pointers                    |pointers


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

* [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
  2012-01-23 10:51 ` [Bug debug/51950] [4.6/4.7 " rguenth at gcc dot gnu.org
@ 2012-01-23 11:29 ` jan.kratochvil at redhat dot com
  2012-01-25 18:40 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-01-23 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-01-23 11:22:36 UTC ---
GDB command for the PASS/FAIL output:
gdb -nx a.out -ex 'b 6' -ex r -ex 'ptype F'


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

* [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
  2012-01-23 10:51 ` [Bug debug/51950] [4.6/4.7 " rguenth at gcc dot gnu.org
  2012-01-23 11:29 ` jan.kratochvil at redhat dot com
@ 2012-01-25 18:40 ` jakub at gcc dot gnu.org
  2012-02-07 15:42 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-25 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-01-25
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-25 17:41:58 UTC ---
Created attachment 26465
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26465
gcc47-pr51950.patch

Untested fix.

This "regressed" with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162691
which just made a cloning bug no longer latent, because DW_AT_object_pointer
the patch added is a reference to one of its children.  The problem is that we
were using clone_tree to clone all the children (in this case of
DW_TAG_subroutine_type), but clone_tree didn't enter all the children
(DW_TAG_formal_parameter in particular) into the hash table.  So we ended up
with a clone DW_TAG_subroutine_type with a single cloned
DW_TAG_formal_parameter.  Next clone_decls_walk attempted to adjust the
references in the attributes (DW_AT_object_pointer), but nothing was in the
hash table, so it created another DW_TAG_formal_parameter clone, and when
adding also its ancestor tree the DW_TAG_subroutine_type has been found in the
hash table and so this second DW_TAG_formal_parameter has been added as another
child.


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

* [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2012-01-25 18:40 ` jakub at gcc dot gnu.org
@ 2012-02-07 15:42 ` rguenth at gcc dot gnu.org
  2012-02-14 19:42 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-07 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2012-02-07 15:42 ` rguenth at gcc dot gnu.org
@ 2012-02-14 19:42 ` jakub at gcc dot gnu.org
  2012-02-14 19:50 ` [Bug debug/51950] [4.6 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 19:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 19:40:18 UTC ---
Author: jakub
Date: Tue Feb 14 19:40:10 2012
New Revision: 184224

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184224
Log:
    PR debug/51950
    * dwarf2out.c (clone_tree_hash): New function.
    (copy_decls_walk): Use it instead of clone_tree.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c


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

* [Bug debug/51950] [4.6 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2012-02-14 19:42 ` jakub at gcc dot gnu.org
@ 2012-02-14 19:50 ` jakub at gcc dot gnu.org
  2012-02-14 23:35 ` jakub at gcc dot gnu.org
  2012-02-14 23:47 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression]        |[4.6 Regression]
                   |fdebug-types-section        |fdebug-types-section
                   |regression for member       |regression for member
                   |pointers                    |pointers

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 19:44:13 UTC ---
Fixed on the trunk so far.


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

* [Bug debug/51950] [4.6 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
                   ` (5 preceding siblings ...)
  2012-02-14 19:50 ` [Bug debug/51950] [4.6 " jakub at gcc dot gnu.org
@ 2012-02-14 23:35 ` jakub at gcc dot gnu.org
  2012-02-14 23:47 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 23:35:19 UTC ---
Author: jakub
Date: Tue Feb 14 23:35:15 2012
New Revision: 184243

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184243
Log:
    Backported from mainline
    2012-02-14  Jakub Jelinek  <jakub@redhat.com>

    PR debug/51950
    * dwarf2out.c (clone_tree_hash): New function.
    (copy_decls_walk): Use it instead of clone_tree.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/dwarf2out.c


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

* [Bug debug/51950] [4.6 Regression] fdebug-types-section regression for member pointers
  2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
                   ` (6 preceding siblings ...)
  2012-02-14 23:35 ` jakub at gcc dot gnu.org
@ 2012-02-14 23:47 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 23:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 23:47:20 UTC ---
Fixed.


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

end of thread, other threads:[~2012-02-14 23:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-22 19:37 [Bug debug/51950] New: [4.6 Regression] fdebug-types-section regression for member pointers jan.kratochvil at redhat dot com
2012-01-23 10:51 ` [Bug debug/51950] [4.6/4.7 " rguenth at gcc dot gnu.org
2012-01-23 11:29 ` jan.kratochvil at redhat dot com
2012-01-25 18:40 ` jakub at gcc dot gnu.org
2012-02-07 15:42 ` rguenth at gcc dot gnu.org
2012-02-14 19:42 ` jakub at gcc dot gnu.org
2012-02-14 19:50 ` [Bug debug/51950] [4.6 " jakub at gcc dot gnu.org
2012-02-14 23:35 ` jakub at gcc dot gnu.org
2012-02-14 23:47 ` jakub 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).