diff options
author | Richard Biener <rguenther@suse.de> | 2017-08-23 12:11:03 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-08-23 12:11:03 +0000 |
commit | 3767b2e4bebebeac612cc4c3210b43c31786a956 (patch) | |
tree | d4c0fd318a7d0cff565706b1f9f95026d0f78052 /gcc/dwarf2out.c | |
parent | c37691e5cd4c354951282777502d3f23e191b977 (diff) | |
download | gcc-3767b2e4bebebeac612cc4c3210b43c31786a956.zip gcc-3767b2e4bebebeac612cc4c3210b43c31786a956.tar.gz gcc-3767b2e4bebebeac612cc4c3210b43c31786a956.tar.bz2 |
re PR lto/81940 (internal compiler error: in dwarf2out_abstract_function, at dwarf2out.c:21613)
2017-08-23 Richard Biener <rguenther@suse.de>
PR lto/81940
* dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
-g0 at compile-time.
* g++.dg/lto/pr81940_0.C: New testcase.
From-SVN: r251306
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0c339bd..ba8d24b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -21609,7 +21609,10 @@ dwarf2out_abstract_function (tree decl) return; old_die = lookup_decl_die (decl); - /* With early debug we always have an old DIE. */ + /* With early debug we always have an old DIE unless we are in LTO + and the user did not compile but only link with debug. */ + if (in_lto_p && ! old_die) + return; gcc_assert (old_die != NULL); if (get_AT (old_die, DW_AT_inline) || get_AT (old_die, DW_AT_abstract_origin)) |