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]