[Bug d/98067] [11 Regression] d: ICE in in force_decl_die, at dwarf2out.c:26197 with -gdwarf-2 -gstrict-dwarf

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 30 11:45:53 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98067

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Iain Buclaw from comment #4)
> What fails is gen_decl_die()
> 
> ---
>  case CONST_DECL:
> ─> if (!is_fortran () && !is_ada () && !is_dlang ())
>      {
>        /* The individual enumerators of an enum type get output when we
> output
>           the Dwarf representation of the relevant enum type itself.  */
>        break;
>      }
> 
>    /* Emit its type.  */
>    gen_type_die (TREE_TYPE (decl), context_die);
> 
>    /* And its containing namespace.  */
>    context_die = declare_in_namespace (decl, context_die);
>  
>    gen_const_die (decl, context_die);
>    break;
> ---
> 
> Here, the condition `!is_dlang ()` returns true because DW_LANG_D does not
> exist in DWARFv2.
> 
> Would it be correct to fallback on a lang_hooks.name comparison if
> dwarf_version < 2?

I wonder if we can instead "delay" applying "strict dwarf" to the actual
output of DW_AT_language.  I mean, with DWARF2 there should be no debug
for D at all since you can't specify the source language ...


More information about the Gcc-bugs mailing list