aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-01-19 12:11:15 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-01-19 12:11:15 -0500
commitcb9e9d8dd1edf2c5c74ec6e552888dd3ef2a1599 (patch)
tree962927994a1efdcce23bee9d31b56b3e733bc349
parent20342a6bc1df6e55bad32a8f5ba9f3ac4a751660 (diff)
downloadgcc-cb9e9d8dd1edf2c5c74ec6e552888dd3ef2a1599.zip
gcc-cb9e9d8dd1edf2c5c74ec6e552888dd3ef2a1599.tar.gz
gcc-cb9e9d8dd1edf2c5c74ec6e552888dd3ef2a1599.tar.bz2
dwarf2out.c (gen_subprogram_die): Don't reuse the in-class decl for the abstract instance of an inline function.
* dwarf2out.c (gen_subprogram_die): Don't reuse the in-class decl for the abstract instance of an inline function. From-SVN: r39137
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c11
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d6e015..58eb78f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-19 Jason Merrill <jason@redhat.com>
+
+ * dwarf2out.c (gen_subprogram_die): Don't reuse the in-class decl
+ for the abstract instance of an inline function.
+
Fri Jan 19 14:31:35 2001 Alexandre Oliva <aoliva@redhat.com>, J"orn Rennecke <amylaar@redhat.com>
* reload1.c (move2add_note_store): Treat all registers directly or
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 3aa71aa..d311dbb 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -9868,12 +9868,11 @@ gen_subprogram_die (decl, context_die)
/* If the definition comes from the same place as the declaration,
maybe use the old DIE. We always want the DIE for this function
that has the *_pc attributes to be under comp_unit_die so the
- debugger can find it. For inlines, that is the concrete instance,
- so we can use the old DIE here. For non-inline methods, we want a
- specification DIE at toplevel, so we need a new DIE. For local
- class methods, this doesn't apply; we just use the old DIE. */
- if ((DECL_ABSTRACT (decl) || old_die->die_parent == comp_unit_die
- || context_die == NULL)
+ debugger can find it. We also need to do this for abstract
+ instances of inlines, since the spec requires the out-of-line copy
+ to have the same parent. For local class methods, this doesn't
+ apply; we just use the old DIE. */
+ if ((old_die->die_parent == comp_unit_die || context_die == NULL)
&& (DECL_ARTIFICIAL (decl)
|| (get_AT_unsigned (old_die, DW_AT_decl_file) == file_index
&& (get_AT_unsigned (old_die, DW_AT_decl_line)