aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-09-17 13:52:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-09-17 13:52:20 +0000
commit1160be126809af874f3d68a514bf38b63076d1cd (patch)
tree7a9f19906d0b9404501db2d99a4001deed61e652 /gcc/dwarf2out.c
parent6fbb9dd1030a749e6055e8c7c1b3406055d3add8 (diff)
downloadgcc-1160be126809af874f3d68a514bf38b63076d1cd.zip
gcc-1160be126809af874f3d68a514bf38b63076d1cd.tar.gz
gcc-1160be126809af874f3d68a514bf38b63076d1cd.tar.bz2
re PR debug/91772 (ICE in add_dwarf_attr, at dwarf2out.c:4412 since r259749)
2019-09-17 Richard Biener <rguenther@suse.de> PR debug/91772 * dwarf2out.c (dwarf2out_late_global_decl): If early dwarf was missing generate locations only once. From-SVN: r275804
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c359c2d..5698c82 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -26660,16 +26660,12 @@ dwarf2out_late_global_decl (tree decl)
{
dw_die_ref die = lookup_decl_die (decl);
- /* We may have to generate early debug late for LTO in case debug
+ /* We may have to generate full debug late for LTO in case debug
was not enabled at compile-time or the target doesn't support
the LTO early debug scheme. */
if (! die && in_lto_p)
- {
- dwarf2out_decl (decl);
- die = lookup_decl_die (decl);
- }
-
- if (die)
+ dwarf2out_decl (decl);
+ else if (die)
{
/* We get called via the symtab code invoking late_global_decl
for symbols that are optimized out.