diff options
author | Richard Biener <rguenther@suse.de> | 2019-02-03 10:53:01 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-02-03 10:53:01 +0000 |
commit | c8eaf058ed6452f3648950b1fa68443bc8e5c106 (patch) | |
tree | 6fe9dced4bd2ffc34136302222cb3ecb67190a39 /gcc/dwarf2out.c | |
parent | 7d8b09996deb2ceb24478f7af6b0bc58045da751 (diff) | |
download | gcc-c8eaf058ed6452f3648950b1fa68443bc8e5c106.zip gcc-c8eaf058ed6452f3648950b1fa68443bc8e5c106.tar.gz gcc-c8eaf058ed6452f3648950b1fa68443bc8e5c106.tar.bz2 |
re PR debug/87295 ([early debug] ICE with -ffat-lto-objects -fdebug-types-section -g)
2019-02-03 Richard Biener <rguenther@suse.de>
PR debug/87295
* dwarf2out.c (copy_ancestor_tree): Register non-stubs as
orig.
* g++.dg/debug/dwarf2/pr87295.C: New testcase.
From-SVN: r268485
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c2a5901..d78e75c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8169,6 +8169,11 @@ copy_ancestor_tree (dw_die_ref unit, dw_die_ref die, decl_table_entry **slot = NULL; struct decl_table_entry *entry = NULL; + /* If DIE refers to a stub unfold that so we get the appropriate + DIE registered as orig in decl_table. */ + if (dw_die_ref c = get_AT_ref (die, DW_AT_signature)) + die = c; + if (decl_table) { /* Check if the entry has already been copied to UNIT. */ |