https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115066
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #1) > Looking at the source code, I wonder if this would fix it: > ... > diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc > index eedb13bb069..045858bf638 100644 > --- a/gcc/dwarf2out.cc > +++ b/gcc/dwarf2out.cc > @@ -29045,7 +29045,7 @@ output_macinfo_op (macinfo_entry *ref) > && !DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET > && (debug_str_section->common.flags & SECTION_MERGE) != 0) > { > - if (dwarf_split_debug_info && dwarf_version >= 5) > + if (dwarf_split_debug_info && (!dwarf_strict || dwarf_version >= 5)) > ref->code = ref->code == DW_MACINFO_define > ? DW_MACRO_define_strx : DW_MACRO_undef_strx; > else > ... Just make it if (dwarf_split_debug_info) then? I mean, this whole code is guarded with if ((!dwarf_strict || dwarf_version >= 5) && ...)