https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88878
--- Comment #9 from Jan Kratochvil <jan.kratochvil at redhat dot com> --- (In reply to Richard Biener from comment #8) > The .debug_types section isn't supposed to be output when in_lto_p > (that's for the LTRANS units where we generally do not output any > types into DWARF). Instead .debug_types has to be output during > dwarf2out_early_finish when we write the declaration dwarf units, > the "early" debug info. That should now be done. Thanks for the explanation, I see -fdebug-types-section -flto does work with trunk without any patch, great! > You can verify with a small testcase and -gpubnames [-flto] where > with -flto both .debug_pubtype and .debug_pubnames are missing. I do not think anyone is interested in those, for DWARF-5 they are officially removed: http://www.dwarfstd.org/doc/DWARF5.pdf * Replace the .debug_pubnames and .debug_pubtypes sections with a single and more functional name index section, .debug_names . And for DWARF-4 those were replaced by GNU .gdb_index .