diff options
author | Richard Biener <rguenther@suse.de> | 2018-07-13 06:42:31 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-07-13 06:42:31 +0000 |
commit | 77e61ab00f9d1731d94ad6595d86153afdb31604 (patch) | |
tree | adde20afa92bb63b633602bb87bc2e40194d66c7 /gcc/dwarf2out.c | |
parent | 061d40da00952fe7eabd8faae60e3cc4ac8f734a (diff) | |
download | gcc-77e61ab00f9d1731d94ad6595d86153afdb31604.zip gcc-77e61ab00f9d1731d94ad6595d86153afdb31604.tar.gz gcc-77e61ab00f9d1731d94ad6595d86153afdb31604.tar.bz2 |
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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c2422e2..ba5c63e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -25388,11 +25388,8 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, generate debug info for the typedef. */ if (is_naming_typedef_decl (TYPE_NAME (type))) { - /* Use the DIE of the containing namespace as the parent DIE of - the type description DIE we want to generate. */ - 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))); + /* Give typedefs the right scope. */ + context_die = scope_die_for (type, context_die); gen_decl_die (TYPE_NAME (type), NULL, NULL, context_die); return; |