dwarf2out.c (gen_field_die): Equate decl number to die.
authorDevang Patel <dpatel@apple.com>
Fri, 3 Sep 2004 17:10:40 +0000 (10:10 -0700)
committerDevang Patel <dpatel@gcc.gnu.org>
Fri, 3 Sep 2004 17:10:40 +0000 (10:10 -0700)
        * dwarf2out.c (gen_field_die): Equate decl number to die.
        * g++.dg/debug/pr15736.cc: New test.

From-SVN: r87036

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/pr15736.cc [new file with mode: 0644]

index 98cd6041e7a385ad21ee7e367a4ef3c439003cde..1b36cab3972e3f1d8760dcb868ba6e98908b18fc 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-03  Devang Patel  <dpatel@apple.com>
+
+       * dwarf2out.c (gen_field_die). Equate decl number to die.
+       
 2004-09-03  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR target/15832
index 02cbef3df9387216d256fc7694db569a22f59c48..832a266156b2992867e13ecbccff5c1322619b56 100644 (file)
@@ -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
index ee61940b65f7b01df4af6c0389026462391a914b..6e8ef6c719e338af8bce9474a649f086c8260790 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-03  Devang Patel  <dpatel@apple.com>
+
+       * g++.dg/debug/pr15736.cc: New test.
+       
 2004-09-02  Mark Mitchell  <mark@codesourcery.com>
 
        * 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 (file)
index 0000000..6e83cd2
--- /dev/null
@@ -0,0 +1,12 @@
+// Test PR 15736 fix
+// Contributed by Devang Patel <dpatel@apple.com>
+// { dg-do compile }
+
+
+struct B {
+  int n;
+};
+
+struct A : B {
+  using B::n;
+};