https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78628
Bug ID: 78628 Summary: GO fails to build a translation unit decl Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: rguenth at gcc dot gnu.org CC: cmang at google dot com Target Milestone: --- The GO FE does not build a TRANSLATION_UNIT_DECL which both LTO and dwarf2out (debug_hooks->register_main_translation_unit) take information from like the language of the source. Frontends nowadays are expected to preferably use a TRANSLATION_UNIT_DECL as DECL_CONTEXT for file-scope entities (rather than NULL_TREE) and LTO requires at least one TU DECL to fixup such NULL_TREE file-scope DECL_CONTEXT.