debug/92763 keep DIEs that might be used in DW_TAG_inlined_subroutine
authorRichard Biener <rguenther@suse.de>
Mon, 20 Jan 2020 09:36:09 +0000 (10:36 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 20 Jan 2020 11:56:43 +0000 (12:56 +0100)
commit991b91497fd50f6e70e5f2c0cfa96e1b74157bdc
treec3ca6b40e715fc26295a664e2ac29e2492217bbb
parent24b178184f260a6ec1516cfb8bb8876874a078a7
debug/92763 keep DIEs that might be used in DW_TAG_inlined_subroutine

We were pruning type-local subroutine DIEs if their context is unused
despite us later needing those DIEs as abstract origins for inlines.
The patch makes code already present for -fvar-tracking-assignments
unconditional.

2020-01-20  Richard Biener  <rguenther@suse.de>

PR debug/92763
* dwarf2out.c (prune_unused_types): Unconditionally mark
called function DIEs.

* g++.dg/debug/pr92763.C: New testcase.
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/pr92763.C [new file with mode: 0644]