https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65536
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The main issue with LTO is that it re-creates a combined linemap but in (most of the time) quite awkward ordering (simply registering random-ordered file:line:column entries by switching files/lines "appropriately"). I've argued that it would be better to stream those file:line:columns separately so we can "sort" them before handing them over to libcpp for linemap re-creation. So currently we do, for each "file:line:column" location we stream in: if (file_change) { if (prev_file) linemap_add (line_table, LC_LEAVE, false, NULL, 0); linemap_add (line_table, LC_ENTER, false, current_file, current_line); } else if (line_change) linemap_line_start (line_table, current_line, current_col); return linemap_position_for_column (line_table, current_col); which of course puts a heavy load on the linemap encoding... But it should definitely work (not sure what it does on line or file "overflow").