On Thu, 21 Jun 2018, Jan Hubicka wrote:
> > > however aren't we supposed to not touch these at late builds? We drop
> > > most of TYPE_DECLs in favour
> > > of IDENTIFIER_TYPE and thus also throwing away DECL_ORIGINAL_TYPEs.
> >
> > We keep quite a bit of TYPE_DECLs around for devirt.
>
> I know, but we do not keep them systematicaly enough to make them useful for
> dwarf2out.
> So I would say dwarf2out touching them is a bug.
>
> >
> > We shouldn't (very often...) end up trying to emit type DIEs late.
> > Here we're running into
> >
> > /* If the prototype had an 'auto' or 'decltype(auto)' return
> > type,
> > emit the real type on the definition die. */
> > if (is_cxx () && debug_info_level > DINFO_LEVEL_TERSE)
> > {
> > dw_die_ref die = get_AT_ref (old_die, DW_AT_type);
> >
> > but that's odd since get_AT_ref shoudn't be able to lookup DW_AT_type
> > in lto1.
> >
> > So a testcase would be nice to have...
>
> OK, I will try to debug into it. Testcase is of course easy - apply patch
> and run
> lto bootstrap :)
:)
Sometimes running the testsuite with -flto -g also pops up such issues.
Richard.