dwarf2out.c (gen_inlined_subroutine_die): If block is abstract, generate a die for the lexical block.

* dwarf2out.c (gen_inlined_subroutine_die): If block is abstract,
generate a die for the lexical block.

From-SVN: r50068
This commit is contained in:
Alexandre Oliva 2002-02-26 22:57:24 +00:00 committed by Alexandre Oliva
parent 973f5b47b7
commit b92b401fd7
3 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-02-26 Alexandre Oliva <aoliva@redhat.com>
* dwarf2out.c (gen_inlined_subroutine_die): If block is abstract,
generate a die for the lexical block.
2002-02-26 Richard Henderson <rth@redhat.com>
* expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law

View File

@ -10604,6 +10604,20 @@ gen_inlined_subroutine_die (stmt, context_die, depth)
decls_for_scope (stmt, subr_die, depth);
current_function_has_inlines = 1;
}
else
/* We may get here if we're the outer block of function A that was
inlined into function B that was inlined into function C. When
generating debugging info for C, dwarf2out_abstract_function(B)
would mark all inlined blocks as abstract, including this one.
So, we wouldn't (and shouldn't) expect labels to be generated
for this one. Instead, just emit debugging info for
declarations within the block. This is particularly important
in the case of initializers of arguments passed from B to us:
if they're statement expressions containing declarations, we
wouldn't generate dies for their abstract variables, and then,
when generating dies for the real variables, we'd die (pun
intended :-) */
gen_lexical_block_die (stmt, context_die, depth);
}
/* Generate a DIE for a field in a record, or structure. */

View File

@ -1,3 +1,7 @@
2002-02-26 Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/debug/20020224-1.c: New.
2002-02-26 Jakub Jelinek <jakub@redhat.com>
* g++.dg/debug/debug4.C: New test.