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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |8.2
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Seems to have to do with .debug_line_str section stuff.

31507     if (debug_line_str_hash)
31508       {
31509         switch_to_section (debug_line_str_section);

and debug_line_str_section is NULL.

The non-LTO variant is allocated under the condition

      if (!dwarf_split_debug_info && !output_asm_line_debug_info ())
        debug_line_str_section = get_section (DEBUG_LINE_STR_SECTION,
                                              DEBUG_STR_SECTION_FLAGS, NULL);

while the LTO one has

      if (!dwarf_split_debug_info && !dwarf2out_as_loc_support)
        debug_line_str_section
          = get_section (DEBUG_LTO_LINE_STR_SECTION,
                         DEBUG_STR_SECTION_FLAGS | SECTION_EXCLUDE, NULL);

making them match doesn't fix the testcase though.

The debug_line_str_hash is populated by output_file_names () which does

      if (DWARF5_USE_DEBUG_LINE_STR)
        str_form = DW_FORM_line_strp;

so I suppose this is again a condition mismatch somehow and all is independent
of -flto as well.  Not sure why it doesn't ICE without -flto though.

Reply via email to