Commit 77e61ab0 by Richard Biener Committed by Richard Biener

re PR debug/86452 (ICE in force_decl_die, at dwarf2out.c:25922 with -g1 and -flto)

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

	PR debug/86452
	* dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
	instead of get_context_die.

From-SVN: r262624
parent 061d40da
2018-07-13 Richard Biener <rguenther@suse.de>
PR debug/86452
* dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
instead of get_context_die.
2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org> 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
Richard Biener <rguenther@suse.de> Richard Biener <rguenther@suse.de>
......
...@@ -25388,11 +25388,8 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, ...@@ -25388,11 +25388,8 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
generate debug info for the typedef. */ generate debug info for the typedef. */
if (is_naming_typedef_decl (TYPE_NAME (type))) if (is_naming_typedef_decl (TYPE_NAME (type)))
{ {
/* Use the DIE of the containing namespace as the parent DIE of /* Give typedefs the right scope. */
the type description DIE we want to generate. */ context_die = scope_die_for (type, context_die);
if (DECL_CONTEXT (TYPE_NAME (type))
&& TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL)
context_die = get_context_die (DECL_CONTEXT (TYPE_NAME (type)));
gen_decl_die (TYPE_NAME (type), NULL, NULL, context_die); gen_decl_die (TYPE_NAME (type), NULL, NULL, context_die);
return; return;
......
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