]> git.ipfire.org Git - thirdparty/gcc.git/commit
Do not emit a redundant DW_TAG_lexical_block for inlined subroutines
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 16 Aug 2024 10:26:27 +0000 (12:26 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 22 Aug 2024 10:35:36 +0000 (12:35 +0200)
commitbcb33b1237042e9540a905d9de19219f876e26c0
tree122f269922965af0435504d6684dd7e60a944561
parent9bbad3685131ec95d970f81bf75f9556d4d92742
Do not emit a redundant DW_TAG_lexical_block for inlined subroutines

While this already works correctly for the case when an inlined
subroutine contains only one subrange, a redundant DW_TAG_lexical_block
is still emitted when the subroutine has multiple blocks.

Fixes: ac02e5b75451 ("re PR debug/37801 (DWARF output for inlined functions
                      doesn't always use DW_TAG_inlined_subroutine)")

gcc/ChangeLog:

PR debug/87440
* dwarf2out.cc (gen_inlined_subroutine_die): Handle the case
of multiple subranges correctly.

gcc/testsuite/ChangeLog:

* gcc.dg/debug/dwarf2/inline7.c: New test.
gcc/dwarf2out.cc
gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c [new file with mode: 0644]