https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118309
--- Comment #1 from Iain Buclaw <ibuclaw at gcc dot gnu.org> --- It looks like the cause is early debug hooks being called before types are complete. My sense is that almost all calls to rest_of_{type,decl}_compilation during the codegen pass in the D frontend are too early as all forward references are not strictly resolved until the last decl/type is generated. So instead, either: 1. Don't call these, let the middle-end do this (via finalize_compilation_unit?) 2. Call rest_of_decl_compilation on all known globals before/after wrapup_global_declaration.