https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98067
--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> --- 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?