diff options
author | Richard Biener <rguenther@suse.de> | 2019-10-17 06:16:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-10-17 06:16:50 +0000 |
commit | abf0474f8a8a466befb8fa4b00b44a51bab22143 (patch) | |
tree | e4229f6e15f9799001d7e1a7a82b989b38fda19f /gcc/dwarf2out.c | |
parent | 24baab8af424826d87c992592944ddef7bfa2e93 (diff) | |
download | gcc-abf0474f8a8a466befb8fa4b00b44a51bab22143.zip gcc-abf0474f8a8a466befb8fa4b00b44a51bab22143.tar.gz gcc-abf0474f8a8a466befb8fa4b00b44a51bab22143.tar.bz2 |
re PR debug/91887 (-fdebug-types-section ICE building chromium)
2019-10-17 Richard Biener <rguenther@suse.de>
PR debug/91887
* dwarf2out.c (gen_formal_parameter_die): Also try to match
context_die against a DW_TAG_GNU_formal_parameter_pack parent.
* g++.dg/debug/dwarf2/pr91887.C: New testcase.
From-SVN: r277090
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index bf69ce4..9f1d921 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22304,19 +22304,18 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, /* If the contexts differ, we may not be talking about the same thing. ??? When in LTO the DIE parent is the "abstract" copy and the - context_die is the specification "copy". But this whole block - should eventually be no longer needed. */ - if (parm_die && parm_die->die_parent != context_die && !in_lto_p) + context_die is the specification "copy". */ + if (parm_die + && parm_die->die_parent != context_die + && (parm_die->die_parent->die_tag != DW_TAG_GNU_formal_parameter_pack + || parm_die->die_parent->die_parent != context_die) + && !in_lto_p) { - if (!DECL_ABSTRACT_P (node)) - { - /* This can happen when creating an inlined instance, in - which case we need to create a new DIE that will get - annotated with DW_AT_abstract_origin. */ - parm_die = NULL; - } - else - gcc_unreachable (); + gcc_assert (!DECL_ABSTRACT_P (node)); + /* This can happen when creating a concrete instance, in + which case we need to create a new DIE that will get + annotated with DW_AT_abstract_origin. */ + parm_die = NULL; } if (parm_die && parm_die->die_parent == NULL) |