Commit 1160be12 by Richard Biener Committed by Richard Biener

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
parent 6fbb9dd1
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.
2019-09-17 Feng Xue <fxue@os.amperecomputing.com> 2019-09-17 Feng Xue <fxue@os.amperecomputing.com>
PR ipa/91089 PR ipa/91089
......
...@@ -26660,16 +26660,12 @@ dwarf2out_late_global_decl (tree decl) ...@@ -26660,16 +26660,12 @@ dwarf2out_late_global_decl (tree decl)
{ {
dw_die_ref die = lookup_decl_die (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 was not enabled at compile-time or the target doesn't support
the LTO early debug scheme. */ the LTO early debug scheme. */
if (! die && in_lto_p) if (! die && in_lto_p)
{ dwarf2out_decl (decl);
dwarf2out_decl (decl); else if (die)
die = lookup_decl_die (decl);
}
if (die)
{ {
/* We get called via the symtab code invoking late_global_decl /* We get called via the symtab code invoking late_global_decl
for symbols that are optimized out. for symbols that are optimized out.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment