https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112
--- Comment #12 from pmderodat at gcc dot gnu.org --- Author: pmderodat Date: Thu Nov 10 11:06:32 2016 New Revision: 242035 URL: https://gcc.gnu.org/viewcvs?rev=242035&root=gcc&view=rev Log: debug/78112: remove recent duplicates for DW_TAG_subprogram attributes Disable unnecessary calls to dwarf2out_decl for the parents of nested functions. This fixes a libstdc++ build regression on x86_64-apple-darwin, as these calls used to add duplicate attributes (for instance DW_AT_inline and DW_AT_object_pointer) to the corresponding DW_TAG_subprogram DIE. Bootstrapped and regtested on x86_64-linux. gcc/ PR debug/78112 * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl on the context only when it has no DIE yet. testsuite/ PR debug/78112 * g++.dg/pr78112.C: New testcase Added: trunk/gcc/testsuite/g++.dg/pr78112.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog