Commit 31a3f58f by Richard Biener Committed by Richard Biener

re PR debug/83765 (LTO bootstrap with Ada fails)

2018-01-10  Richard Biener  <rguenther@suse.de>

	PR debug/83765
	* dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
	early out so it also covers the case where we have a non-NULL
	origin.

From-SVN: r256428
parent 6737facb
2018-01-10 Richard Biener <rguenther@suse.de>
PR debug/83765
* dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
early out so it also covers the case where we have a non-NULL
origin.
2018-01-10 Richard Sandiford <richard.sandiford@linaro.org> 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83753 PR tree-optimization/83753
......
...@@ -22044,6 +22044,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -22044,6 +22044,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
int declaration = (current_function_decl != decl int declaration = (current_function_decl != decl
|| class_or_namespace_scope_p (context_die)); || class_or_namespace_scope_p (context_die));
/* A declaration that has been previously dumped needs no
additional information. */
if (old_die && declaration)
return;
/* Now that the C++ front end lazily declares artificial member fns, we /* Now that the C++ front end lazily declares artificial member fns, we
might need to retrofit the declaration into its class. */ might need to retrofit the declaration into its class. */
if (!declaration && !origin && !old_die if (!declaration && !origin && !old_die
...@@ -22084,11 +22089,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -22084,11 +22089,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
much as possible. */ much as possible. */
else if (old_die) else if (old_die)
{ {
/* A declaration that has been previously dumped needs no
additional information. */
if (declaration)
return;
if (!get_AT_flag (old_die, DW_AT_declaration) if (!get_AT_flag (old_die, DW_AT_declaration)
/* We can have a normal definition following an inline one in the /* We can have a normal definition following an inline one in the
case of redefinition of GNU C extern inlines. case of redefinition of GNU C extern inlines.
......
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