As suspected during review the DECL_ABSTRACT_P handling in gen_formal_parameter_die is no longer necessary so the following patch removes it.
[LTO] bootstrapped on x86_64-unknown-linux-gnu, testing in progress. The gdb testsuite shows no regression. Will apply after testing finished. Richard. 2017-08-31 Richard Biener <rguent...@suse.de> * dwarf2out.c (gen_formal_parameter_die): Remove no longer needed DECL_ABSTRACT_P handling. Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 251559) +++ gcc/dwarf2out.c (working copy) @@ -21288,28 +21288,9 @@ gen_formal_parameter_die (tree node, tre tree ultimate_origin; dw_die_ref parm_die = NULL; - if (TREE_CODE_CLASS (TREE_CODE (node_or_origin)) == tcc_declaration) + if (DECL_P (node_or_origin)) { parm_die = lookup_decl_die (node); - - /* If the contexts differ, we may not be talking about the same - thing. - ??? When in LTO the DIE parent is the "abstract" copy and the - context_die is the specification "copy". But this whole block - should eventually be no longer needed. */ - if (parm_die && parm_die->die_parent != context_die && !in_lto_p) - { - if (!DECL_ABSTRACT_P (node)) - { - /* This can happen when creating an inlined instance, in - which case we need to create a new DIE that will get - annotated with DW_AT_abstract_origin. */ - parm_die = NULL; - } - else - gcc_unreachable (); - } - if (parm_die && parm_die->die_parent == NULL) { /* Check that parm_die already has the right attributes that