From 90300b8ca23bb39af5196a9fa1d5c20f829ae537 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 3 Sep 2004 10:10:40 -0700 Subject: [PATCH] dwarf2out.c (gen_field_die): Equate decl number to die. * dwarf2out.c (gen_field_die): Equate decl number to die. * g++.dg/debug/pr15736.cc: New test. From-SVN: r87036 --- gcc/ChangeLog | 4 ++++ gcc/dwarf2out.c | 3 +++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/debug/pr15736.cc | 12 ++++++++++++ 4 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/debug/pr15736.cc diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98cd6041e7a..1b36cab3972 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-09-03 Devang Patel + + * dwarf2out.c (gen_field_die). Equate decl number to die. + 2004-09-03 Vladimir Makarov PR target/15832 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 02cbef3df93..832a266156b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11689,6 +11689,9 @@ gen_field_die (tree decl, dw_die_ref context_die) add_AT_unsigned (decl_die, DW_AT_accessibility, DW_ACCESS_protected); else if (TREE_PRIVATE (decl)) add_AT_unsigned (decl_die, DW_AT_accessibility, DW_ACCESS_private); + + /* Equate decl number to die, so that we can look up this decl later on. */ + equate_decl_number_to_die (decl, decl_die); } #if 0 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ee61940b65f..6e8ef6c719e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-09-03 Devang Patel + + * g++.dg/debug/pr15736.cc: New test. + 2004-09-02 Mark Mitchell * README.QMTEST: Fix out-of-date link. diff --git a/gcc/testsuite/g++.dg/debug/pr15736.cc b/gcc/testsuite/g++.dg/debug/pr15736.cc new file mode 100644 index 00000000000..6e83cd26c2e --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/pr15736.cc @@ -0,0 +1,12 @@ +// Test PR 15736 fix +// Contributed by Devang Patel +// { dg-do compile } + + +struct B { + int n; +}; + +struct A : B { + using B::n; +}; -- 2.30.2