From b1682481b9026f000bb7f992b548651b2973daca Mon Sep 17 00:00:00 2001 From: aoliva Date: Thu, 11 Sep 2003 13:41:56 +0000 Subject: [PATCH] PR fortran/11522 * dwarf2out.c (gen_inlined_subroutine_die): Emit abstract function for ultimate origin even if block is abstract. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71301 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be4c46b5b63..0c7f82b405c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-09-11 Alexandre Oliva + + PR fortran/11522 + * dwarf2out.c (gen_inlined_subroutine_die): Emit abstract function + for ultimate origin even if block is abstract. + 2003-09-11 Roger Sayle * combine.c (combine_simplify_rtx): Move several NOT and NEG diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index eac43ac77d3..5fa730e1b55 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10990,16 +10990,20 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die, int depth) static void gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth) { + tree decl = block_ultimate_origin (stmt); + + /* Emit info for the abstract instance first, if we haven't yet. We + must emit this even if the block is abstract, otherwise when we + emit the block below (or elsewhere), we may end up trying to emit + a die whose origin die hasn't been emitted, and crashing. */ + dwarf2out_abstract_function (decl); + if (! BLOCK_ABSTRACT (stmt)) { dw_die_ref subr_die = new_die (DW_TAG_inlined_subroutine, context_die, stmt); - tree decl = block_ultimate_origin (stmt); char label[MAX_ARTIFICIAL_LABEL_BYTES]; - /* Emit info for the abstract instance first, if we haven't yet. */ - dwarf2out_abstract_function (decl); - add_abstract_origin_attribute (subr_die, decl); ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_BEGIN_LABEL, BLOCK_NUMBER (stmt)); -- 2.11.4.GIT