Commit 9c13689e by Richard Biener Committed by Richard Biener

re PR lto/86654 (ICE in gen_member_die, at dwarf2out.c:24933)

2018-07-25  Richard Biener  <rguenther@suse.de>

	PR debug/86654
	* dwarf2out.c (dwarf2out_decl): Do not handle nested functions
	special wrt context_die late.
	(gen_subprogram_die): Re-use DIEs in local scope.

From-SVN: r262965
parent a9d49e96
2018-07-25 Richard Biener <rguenther@suse.de>
PR debug/86654
* dwarf2out.c (dwarf2out_decl): Do not handle nested functions
special wrt context_die late.
(gen_subprogram_die): Re-use DIEs in local scope.
2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86644
......
......@@ -22766,6 +22766,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
*/
|| (old_die->die_parent
&& old_die->die_parent->die_tag == DW_TAG_module)
|| local_scope_p (old_die->die_parent)
|| context_die == NULL)
&& (DECL_ARTIFICIAL (decl)
|| (get_AT_file (old_die, DW_AT_decl_file) == file_index
......@@ -26702,8 +26703,11 @@ dwarf2out_decl (tree decl)
case FUNCTION_DECL:
/* If we're a nested function, initially use a parent of NULL; if we're
a plain function, this will be fixed up in decls_for_scope. If
we're a method, it will be ignored, since we already have a DIE. */
if (decl_function_context (decl)
we're a method, it will be ignored, since we already have a DIE.
Avoid doing this late though since clones of class methods may
otherwise end up in limbo and create type DIEs late. */
if (early_dwarf
&& decl_function_context (decl)
/* But if we're in terse mode, we don't care about scope. */
&& debug_info_level > DINFO_LEVEL_TERSE)
context_die = NULL;
......
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