re PR debug/39706 (namespaces represented incorrectly in debug_pubnames)
2009-08-04 Dodji Seketeli <dodji@redhat.com> gcc/cp/ChangeLog: PR debug/39706 * error.c (lang_decl_name): Print qualified names for decls in namespace scope. gcc/testsuite/ChangeLog: PR debug/39706 * g++.dg/debug/dwarf2/pubnames-1.C: New test. From-SVN: r150452
This commit is contained in:
parent
567ef7490f
commit
b96fe38e46
4 changed files with 28 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-08-04 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR debug/39706
|
||||
* error.c (lang_decl_name): Print qualified names for decls
|
||||
in namespace scope.
|
||||
|
||||
2009-08-03 Jason Merrill <jason@redhat.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
|
|
@ -2331,7 +2331,10 @@ lang_decl_name (tree decl, int v, bool translate)
|
|||
|
||||
reinit_cxx_pp ();
|
||||
pp_translate_identifiers (cxx_pp) = translate;
|
||||
if (v == 1 && DECL_CLASS_SCOPE_P (decl))
|
||||
if (v == 1
|
||||
&& (DECL_CLASS_SCOPE_P (decl)
|
||||
|| (DECL_NAMESPACE_SCOPE_P (decl)
|
||||
&& CP_DECL_CONTEXT (decl) != global_namespace)))
|
||||
{
|
||||
dump_type (CP_DECL_CONTEXT (decl), TFF_PLAIN_IDENTIFIER);
|
||||
pp_cxx_colon_colon (cxx_pp);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-08-04 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR debug/39706
|
||||
* g++.dg/debug/dwarf2/pubnames-1.C: New test.
|
||||
|
||||
2009-08-03 Jason Merrill <jason@redhat.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
|
13
gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
Normal file
13
gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR debug/39706
|
||||
// { dg-options "-g -dA" }
|
||||
// { dg-do compile }
|
||||
// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
|
||||
|
||||
namespace ns { int ns_x; }
|
||||
class y { public: static int y_x; };
|
||||
int y::y_x;
|
||||
int main() { return ns::ns_x; }
|
Loading…
Add table
Reference in a new issue