aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
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 /gcc/dwarf2out.c
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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 5 insertions, 6 deletions
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)