2018-07-16 Richard Biener <rguenther@suse.de>
PR lto/86523
* dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
for function-local FUNCTION_DECL and RESULT_DECL immediately.
* g++.dg/lto/pr86523-1_0.C: New testcase.
* g++.dg/lto/pr86523-2_0.C: Likewise.
From-SVN: r262696
+2018-07-16 Richard Biener <rguenther@suse.de>
+
+ PR lto/86523
+ * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
+ for function-local FUNCTION_DECL and RESULT_DECL immediately.
+
2018-07-16 Martin Liska <mliska@suse.cz>
PR ipa/86529
imports the original CUs. */
parent = comp_unit_die ();
else if (TREE_CODE (ctx) == FUNCTION_DECL
+ && TREE_CODE (decl) != FUNCTION_DECL
&& TREE_CODE (decl) != PARM_DECL
+ && TREE_CODE (decl) != RESULT_DECL
&& TREE_CODE (decl) != BLOCK)
/* Leave function local entities parent determination to when
we process scope vars. */
+2018-07-16 Richard Biener <rguenther@suse.de>
+
+ PR lto/86523
+ * g++.dg/lto/pr86523-1_0.C: New testcase.
+ * g++.dg/lto/pr86523-2_0.C: Likewise.
+
2018-07-16 Martin Liska <mliska@suse.cz>
PR ipa/86529
--- /dev/null
+// { dg-lto-do link }
+// { dg-lto-options {{-O2 -flto -g -shared}} }
+namespace {
+ class a typedef b;
+ class a {};
+} // namespace
+class c {
+ struct C {
+ b d;
+ };
+ C e() const;
+};
+c::C c::e() const {
+ C g;
+ struct h {
+ C g;
+ h(C *) {}
+ } f(&g);
+ return g;
+}
+
--- /dev/null
+// { dg-lto-do link }
+// { dg-lto-options {{-O2 -flto -g -shared}} }
+class a typedef b;
+class a {};
+class c {
+ struct C {
+ b d;
+ };
+ C e() const;
+};
+c::C c::e() const {
+ C g;
+ struct h {
+ C g;
+ h(C *) {}
+ } f(&g);
+ return g;
+}