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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 1f39df3b1e2..5a2538f80e1 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -27282,7 +27282,7 @@ dwarf2out_late_global_decl (tree decl)
       /* We may have to generate full debug late for LTO in case debug
          was not enabled at compile-time or the target doesn't support
         the LTO early debug scheme.  */
-      if (! die && in_lto_p)
+      if (! die && in_lto_p && (TARGET_PECOFF || TARGET_COFF))
        dwarf2out_decl (decl);
       else if (die)
        {

tests clean though.  Obviously that will cease creating debug info for
all late generated decls, even when done explicitely (like for late
generated clones).

Reply via email to