Commit 0150d9a1 by Richard Biener Committed by Richard Biener

re PR debug/86523 (ICE in gen_member_die, at dwarf2out.c:24933 starting from r262560)

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
parent c4d0acf8
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
......
......@@ -5959,7 +5959,9 @@ dwarf2out_register_external_die (tree decl, const char *sym,
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
......
// { 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;
}
// { 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;
}
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