From cb9e9d8dd1edf2c5c74ec6e552888dd3ef2a1599 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 19 Jan 2001 12:11:15 -0500 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/dwarf2out.c | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d6e0151ebe..58eb78f7f5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-19 Jason Merrill + + * 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 , J"orn Rennecke * reload1.c (move2add_note_store): Treat all registers directly or diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 3aa71aa4dc3..d311dbbbd2f 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) -- 2.30.2