On Thu, Sep 13, 2018 at 5:22 PM Nathan Sidwell <nat...@acm.org> wrote:
>
> Richard, Jan,  as early debug experts perhaps you can clue me in?
>
> 87295 is an ICE in lookup_external_ref, we strcmp a NULL
> die->die_id.die_symbol.
>
> The die is being cloned in clone_as_declaration during a
> copy_ancestor_tree walk ultimately coming from
> copy_decls_for_unworthy_types.
>
> The incoming die is DW_TAG_structure_type with comdat_type_p set.  We
> create a new_die_raw, which has NULL die_id.die_symbol and then never
> set that field (or another piece of the die_id union).
>
> How is this supposed to work?

I think we're forgetting to "undo" the -fdebug-types-section part of the early
LTO debug output before trying to do it again for the fat part and there we
get confused.

Test coverage is non-existant for -fdebug-types-section (mostly), so this
has gone unnoticed.  In dwarf2out_finish you'll find a if
(flag_generate_lto || ...)
section done early that undoes quite some stuff but appearantly that's not
enough ...

Richard.

>
> nathan
> --
> Nathan Sidwell

Reply via email to