This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/65536] [5 regression] LTO line number information garbled
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Mar 2015 10:06:32 +0000
- Subject: [Bug lto/65536] [5 regression] LTO line number information garbled
- Auto-submitted: auto-generated
- References: <bug-65536-4 at http dot gcc dot gnu dot org/bugzilla/>
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").