re PR debug/37801 (DWARF output for inlined functions doesn't always use DW_TAG_inlin...
authorRichard Biener <rguenther@suse.de>
Thu, 27 Sep 2018 14:10:45 +0000 (14:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 27 Sep 2018 14:10:45 +0000 (14:10 +0000)
commitac02e5b75451cc3c6ae9028338183bcdcb056ea2
treec7fd269bf115c497c78df6904016cfb257f1da20
parent19ef5a8fd5710a197ddeaafc2c69ff77217fece5
re PR debug/37801 (DWARF output for inlined functions doesn't always use DW_TAG_inlined_subroutine)

2018-09-27  Richard Biener  <rguenther@suse.de>

PR debug/37801
PR debug/87440
* dwarf2out.c (set_block_origin_self): Do not mark outermost
block as we do not output that.
(gen_inlined_subroutine_die): Elide the originally outermost
block, matching what we do for concrete instances.
(decls_for_scope): Add parameter specifying whether to recurse
to subblocks.

* gcc.dg/debug/dwarf2/inline2.c: Adjust.
* gcc.dg/debug/dwarf2/inline4.c: New testcase.

From-SVN: r264667
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
gcc/testsuite/gcc.dg/debug/dwarf2/inline4.c [new file with mode: 0644]