+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>
PR tree-optimization/83753
int declaration = (current_function_decl != decl
|| 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
might need to retrofit the declaration into its class. */
if (!declaration && !origin && !old_die
much as possible. */
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)
/* We can have a normal definition following an inline one in the
case of redefinition of GNU C extern inlines.