From 80048aa13a6b55d2be485000840a4e1c8b57d8e7 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Wed, 13 Sep 2023 23:41:22 -0700 Subject: debug/111409 - don't generate COMDAT macro sections for split DWARF Split DWARF files aren't processed by the linker, so DW_MACRO_import offsets aren't relocated and the .debug_macro.dwo sections aren't deduplicated and merged. There's no clear way for this to work for split DWARF, so disable it. gcc/ChangeLog: PR debug/111409 * dwarf2out.cc (output_macinfo): Don't call optimize_macinfo_range if dwarf_split_debug_info. gcc/testsuite/ChangeLog: PR debug/111409 * gcc.dg/pr111409.c: New test. --- gcc/dwarf2out.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/dwarf2out.cc') diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index c4a935d..f60a065 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -29247,6 +29247,7 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug) case DW_MACINFO_define: case DW_MACINFO_undef: if ((!dwarf_strict || dwarf_version >= 5) + && !dwarf_split_debug_info && HAVE_COMDAT_GROUP && vec_safe_length (files) != 1 && i > 0 -- cgit v1.1