Message ID | 55482AF6.1090207@redhat.com |
---|---|
State | New |
Headers | show |
On 05/04/2015 09:29 PM, Aldy Hernandez wrote: > The code handling parameter DIEs needed a little tweaking for variable > length template arguments. I've relaxed the original assert, but this > may require tweaking at branch review time-- hopefully later this week. What testcase motivated this? We're within a formal_parameter_pack, but DECL_ABSTRACT is set, so I guess the earlier parm_die was from a declaration? If we're going to re-use the individual parms, I'd think we want to reuse the pack as well. Jason
On 05/05/2015 02:08 PM, Jason Merrill wrote: > On 05/04/2015 09:29 PM, Aldy Hernandez wrote: >> The code handling parameter DIEs needed a little tweaking for variable >> length template arguments. I've relaxed the original assert, but this >> may require tweaking at branch review time-- hopefully later this week. > > What testcase motivated this? We're within a formal_parameter_pack, but Pretty much every other test in the libstdc++-v3 testsuite was failing with the ICE I elided in my patch. I wasn't able to narrow it down to a tiny test, but I can do so if you want. ?? Aldy
On 05/05/2015 04:33 PM, Aldy Hernandez wrote: > On 05/05/2015 02:08 PM, Jason Merrill wrote: >> On 05/04/2015 09:29 PM, Aldy Hernandez wrote: >>> The code handling parameter DIEs needed a little tweaking for variable >>> length template arguments. I've relaxed the original assert, but this >>> may require tweaking at branch review time-- hopefully later this week. >> >> What testcase motivated this? We're within a formal_parameter_pack, but > > Pretty much every other test in the libstdc++-v3 testsuite was failing > with the ICE I elided in my patch. > > I wasn't able to narrow it down to a tiny test, but I can do so if you > want. ?? I think that would be helpful so we can decide what we want the debug output to look like. Jason
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c51cea1..a5b155f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18018,8 +18018,20 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, DW_AT_abstract_origin. */ if (parm_die && parm_die->die_parent != context_die) { - gcc_assert (!DECL_ABSTRACT_P (node)); - parm_die = NULL; + if (!DECL_ABSTRACT_P (node)) + { + gcc_assert (!DECL_ABSTRACT_P (node)); + parm_die = NULL; + } + else + { + /* Reuse DIE even with a differing context. This + happens when called through + dwarf2out_abstract_function for + formal parameter packs. */ + gcc_assert (parm_die->die_parent->die_tag + == DW_TAG_GNU_formal_parameter_pack); + } } if (parm_die && parm_die->die_parent == NULL)