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
This commit is contained in:
Richard Biener 2019-10-17 06:16:50 +00:00 committed by Richard Biener
parent 24baab8af4
commit abf0474f8a
4 changed files with 34 additions and 12 deletions

View File

@ -1,3 +1,9 @@
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.
2019-10-16 Jakub Jelinek <jakub@redhat.com> 2019-10-16 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-strlen.c (maybe_invalidate): Use * tree-ssa-strlen.c (maybe_invalidate): Use

View File

@ -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 /* If the contexts differ, we may not be talking about the same
thing. thing.
??? When in LTO the DIE parent is the "abstract" copy and the ??? When in LTO the DIE parent is the "abstract" copy and the
context_die is the specification "copy". But this whole block context_die is the specification "copy". */
should eventually be no longer needed. */ if (parm_die
if (parm_die && parm_die->die_parent != context_die && !in_lto_p) && 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)) gcc_assert (!DECL_ABSTRACT_P (node));
{ /* This can happen when creating a concrete instance, in
/* This can happen when creating an inlined instance, in which case we need to create a new DIE that will get
which case we need to create a new DIE that will get annotated with DW_AT_abstract_origin. */
annotated with DW_AT_abstract_origin. */ parm_die = NULL;
parm_die = NULL;
}
else
gcc_unreachable ();
} }
if (parm_die && parm_die->die_parent == NULL) if (parm_die && parm_die->die_parent == NULL)

View File

@ -1,3 +1,8 @@
2019-10-17 Richard Biener <rguenther@suse.de>
PR debug/91887
* g++.dg/debug/dwarf2/pr91887.C: New testcase.
2019-10-16 Martin Sebor <msebor@redhat.com> 2019-10-16 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83821 PR tree-optimization/83821

View File

@ -0,0 +1,12 @@
// { dg-do compile }
// { dg-require-effective-target c++11 }
// { dg-options "-g -fdebug-types-section" }
class A {
public:
A();
template <typename U> A(U);
};
template <class> struct B { typedef A type; };
template <class R, typename... Args>
int Bind(R(Args...), typename B<Args>::type...) { return 0; }
void KeepBufferRefs(A, A) { A a, b(Bind(KeepBufferRefs, a, b)); }