public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
@ 2013-06-03 21:13 dje at google dot com
  2014-03-27 23:31 ` [Bug debug/57519] " sivachandra at google dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dje at google dot com @ 2013-06-03 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57519
           Summary: DW_TAG_imported_declaration put in wrong class (base
                    class instead of derived class)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at google dot com

Created attachment 30253
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30253&action=edit
assembler output

[with svn head as of today]

class base
{
 public:
  int foo (int x) { return x; }
};

class derived : base
{
 public:
  using base::foo;
  double foo (double x) { return x; }
};

int
main ()
{
  derived *d = new derived;
  return d->foo (0);
}

bash$ g++ -m64 -c -o using-method.o64 using-method.cc -g -save-temps -dA
-fverbose-asm

I see this in the debug info for base (instead of derived):

        .uleb128 0x6    # (DIE (0x58) DW_TAG_imported_declaration)
        .byte   0x1     # DW_AT_decl_file (using-method.cc)
        .byte   0x8     # DW_AT_decl_line
        .long   0x35    # DW_AT_import

I would have expected this to be in the debug info for derived.

[full output attached]


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
@ 2014-03-27 23:31 ` sivachandra at google dot com
  2014-06-10 14:55 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sivachandra at google dot com @ 2014-03-27 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Siva Chandra <sivachandra at google dot com> ---
I sent out a patch for this PR:
http://gcc.gnu.org/ml/gcc-patches/2014-03/msg01332.html


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
  2014-03-27 23:31 ` [Bug debug/57519] " sivachandra at google dot com
@ 2014-06-10 14:55 ` dominiq at lps dot ens.fr
  2014-06-17 23:10 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-06-10 14:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The test g++.dg/debug/dwarf2/imported-decl-2.C introduced in r211151 fails on
darwin:

FAIL: g++.dg/debug/dwarf2/imported-decl-2.C -std=gnu++98  scan-assembler-times
ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE .0x[0-9a-f]*.
DW_TAG_imported_declaration 1
FAIL: g++.dg/debug/dwarf2/imported-decl-2.C -std=gnu++11  scan-assembler-times
ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE .0x[0-9a-f]*.
DW_TAG_imported_declaration 1
FAIL: g++.dg/debug/dwarf2/imported-decl-2.C -std=gnu++1y  scan-assembler-times
ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE .0x[0-9a-f]*.
DW_TAG_imported_declaration 1

There is no 'DW_TAG_imported_declaration' emitted in the assembly.


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
  2014-03-27 23:31 ` [Bug debug/57519] " sivachandra at google dot com
  2014-06-10 14:55 ` dominiq at lps dot ens.fr
@ 2014-06-17 23:10 ` jason at gcc dot gnu.org
  2014-06-17 23:22 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-06-17 23:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun 17 23:10:16 2014
New Revision: 211755

URL: https://gcc.gnu.org/viewcvs?rev=211755&root=gcc&view=rev
Log:
        PR debug/57519
        * class.c (handle_using_decl): Pass the correct scope to
        cp_emit_debug_info_for_using.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C
Modified:
    branches/gcc-4_9-branch/gcc/cp/ChangeLog
    branches/gcc-4_9-branch/gcc/cp/class.c


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
                   ` (2 preceding siblings ...)
  2014-06-17 23:10 ` jason at gcc dot gnu.org
@ 2014-06-17 23:22 ` jason at gcc dot gnu.org
  2014-11-21  8:57 ` fxcoudert at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-06-17 23:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.1

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.9.1.


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
                   ` (3 preceding siblings ...)
  2014-06-17 23:22 ` jason at gcc dot gnu.org
@ 2014-11-21  8:57 ` fxcoudert at gcc dot gnu.org
  2014-11-21  8:58 ` fxcoudert at gcc dot gnu.org
  2015-04-03 14:02 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-21  8:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2014-11-21
                 CC|                            |fxcoudert at gcc dot gnu.org
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #6 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #3)
> The test g++.dg/debug/dwarf2/imported-decl-2.C introduced in r211151 fails
> on darwin

Still fails with current trunk on x86_64-apple-darwin14. I am attaching the
assembler generated by "g++ -gdwarf-2 -dA -O0 -fno-merge-debug-strings
imported-decl-2.C -S -fverbose-asm".


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
                   ` (4 preceding siblings ...)
  2014-11-21  8:57 ` fxcoudert at gcc dot gnu.org
@ 2014-11-21  8:58 ` fxcoudert at gcc dot gnu.org
  2015-04-03 14:02 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-21  8:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

--- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Created attachment 34064
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34064&action=edit
Code generated for the testcase by "g++ -gdwarf-2 -dA -O0
-fno-merge-debug-strings imported-decl-2.C -S -fverbose-asm"


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

* [Bug debug/57519] DW_TAG_imported_declaration put in wrong class (base class instead of derived class)
  2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
                   ` (5 preceding siblings ...)
  2014-11-21  8:58 ` fxcoudert at gcc dot gnu.org
@ 2015-04-03 14:02 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2015-04-03 14:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #7)
> Created attachment 34064 [details]
> Code generated for the testcase by "g++ -gdwarf-2 -dA -O0
> -fno-merge-debug-strings imported-decl-2.C -S -fverbose-asm"

note that Darwin is -gstrict-dwarf and the test also fails on x86_64-linux if
the options are changed to include this:
-gdwarf-2 -gstrict-dwarf -dA -O0 -fno-merge-debug-strings


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

end of thread, other threads:[~2015-04-03 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 21:13 [Bug debug/57519] New: DW_TAG_imported_declaration put in wrong class (base class instead of derived class) dje at google dot com
2014-03-27 23:31 ` [Bug debug/57519] " sivachandra at google dot com
2014-06-10 14:55 ` dominiq at lps dot ens.fr
2014-06-17 23:10 ` jason at gcc dot gnu.org
2014-06-17 23:22 ` jason at gcc dot gnu.org
2014-11-21  8:57 ` fxcoudert at gcc dot gnu.org
2014-11-21  8:58 ` fxcoudert at gcc dot gnu.org
2015-04-03 14:02 ` iains 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).