On Fri, Aug 04, 2017 at 02:21:29PM +0200, Richard Biener wrote: > ! /* Initialize the various sections and labels for dwarf output. */ > > static void > ! init_sections_and_labels (void)
... These changes broke DWARF-5 support. E.g. in gcc-7 and before this change there was: > ! if (!dwarf_split_debug_info) > { ... > ! debug_loc_section = get_section (dwarf_version >= 5 > ! ? DEBUG_LOCLISTS_SECTION > ! : DEBUG_LOC_SECTION, > ! SECTION_DEBUG, NULL); the above which would use .debug_loclists section for debug_loc_section instead of .debug_loc for -gdwarf-5, because that is what DWARF-5 requires and the section content is ABI incompatible. But current trunk does > ! debug_loc_section = get_section (DEBUG_LOC_SECTION, > ! SECTION_DEBUG, NULL); only, so the DWARF-5 content is emitted into .debug_loc section. Or, there used to be: > ! if (!dwarf_split_debug_info && !DWARF2_ASM_LINE_DEBUG_INFO) > ! debug_line_str_section = get_section (DEBUG_LINE_STR_SECTION, > ! DEBUG_STR_SECTION_FLAGS, NULL); which has no replacement at all, debug_line_str_hash is NULL and so !DWARF2_ASM_LINE_DEBUG_INFO compiler ICEs on pretty much all -gdwarf-5, because it can't emit the strings into that section. Do you have rough time when you wrote changes to these functions (so that I could diff init_sections_and_labels changes in between that date and before your LTO debug changes and find out what needs to be double checked besides those two)? I presume we'll need some name for a LTO .debug_loclists variant. Also, seeing: #ifndef DEBUG_LINE_SECTION #define DEBUG_LINE_SECTION ".debug_line" #endif #ifndef DEBUG_DWO_LINE_SECTION #define DEBUG_DWO_LINE_SECTION ".debug_line.dwo" #endif #ifndef DEBUG_LTO_LINE_SECTION #define DEBUG_LTO_LINE_SECTION ".gnu.debuglto_.debug_line.dwo" #endif that looks like a pasto, , I'd expect the last one, since it doesn't have DWO_ in the name, to be just .gnu.debuglto_.debug_line . Jakub