public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65536] New: [5 regression] LTO line number information garbled Date: Tue, 24 Mar 2015 07:42:00 -0000 [thread overview] Message-ID: <bug-65536-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65536 Bug ID: 65536 Summary: [5 regression] LTO line number information garbled Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org As shown in https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01151.html warnings seems to come out wrong with large programs. I did not manage to reproduce it with small testcase. Columns tends to be 0 and line numbers (somewhat) off usually pointing to the begging of type definition instead of the field in question but sometimes they just point in further distance. This reproduce both on Fireofx and Chromium The problem goes away with: Index: lto-streamer-in.c =================================================================== --- lto-streamer-in.c (revision 221582) +++ lto-streamer-in.c (working copy) @@ -200,7 +200,7 @@ lto_input_location (struct bitpack_d *bp if (column_change) current_col = bp_unpack_var_len_unsigned (bp); - if (file_change) + if (file_change || 1) { if (prev_file) linemap_add (line_table, LC_LEAVE, false, NULL, 0); (which also quite significantly increases memory use). The warnings seems to be right on beggining and gets worse at end, so I suspect it is some kind of overflow in libcpp. The problem stays with: Index: lto-streamer-in.c =================================================================== --- lto-streamer-in.c (revision 221582) +++ lto-streamer-in.c (working copy) @@ -207,7 +207,7 @@ lto_input_location (struct bitpack_d *bp linemap_add (line_table, LC_ENTER, false, current_file, current_line); } - else if (line_change) + else if (line_change || 1) linemap_line_start (line_table, current_line, current_col); return linemap_position_for_column (line_table, current_col); One obvious thing is that linemap_line_start takes argument 3 to be max column hint, but we pass current_col that is not cool. I see that libcpp seems to drop the column info after some threshold (that is clearly too small for LTO) but why the line numbers are off?
next reply other threads:[~2015-03-24 6:33 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-24 7:42 hubicka at gcc dot gnu.org [this message] 2015-03-24 10:15 ` [Bug lto/65536] " rguenth at gcc dot gnu.org 2015-03-24 10:15 ` [Bug lto/65536] [5 regression] " rguenth at gcc dot gnu.org 2015-03-24 12:52 ` [Bug lto/65536] " manu at gcc dot gnu.org 2015-03-24 13:32 ` rguenth at gcc dot gnu.org 2015-03-24 14:34 ` manu at gcc dot gnu.org 2015-03-24 14:42 ` manu at gcc dot gnu.org 2015-03-24 14:54 ` manu at gcc dot gnu.org 2015-03-24 16:22 ` jakub at gcc dot gnu.org 2015-03-24 16:44 ` manu at gcc dot gnu.org 2015-03-24 17:23 ` hubicka at ucw dot cz 2015-03-24 19:39 ` jakub at gcc dot gnu.org 2015-03-24 19:41 ` hubicka at gcc dot gnu.org 2015-03-24 19:51 ` manu at gcc dot gnu.org 2015-03-24 19:58 ` manu at gcc dot gnu.org 2015-03-24 20:22 ` manu at gcc dot gnu.org 2015-03-25 3:11 ` hubicka at gcc dot gnu.org 2015-03-25 3:22 ` manu at gcc dot gnu.org 2015-03-25 7:21 ` hubicka at ucw dot cz 2015-03-25 7:24 ` hubicka at ucw dot cz 2015-03-25 9:18 ` marxin at gcc dot gnu.org 2015-03-25 9:54 ` marxin at gcc dot gnu.org 2015-03-25 10:12 ` rguenth at gcc dot gnu.org 2015-03-25 10:45 ` rguenth at gcc dot gnu.org 2015-03-25 13:30 ` manu at gcc dot gnu.org 2015-03-25 18:13 ` hubicka at ucw dot cz 2015-03-25 21:40 ` hubicka at gcc dot gnu.org 2015-03-25 22:04 ` manu at gcc dot gnu.org 2015-03-25 23:36 ` manu at gcc dot gnu.org 2015-03-26 0:08 ` hubicka at gcc dot gnu.org 2015-03-26 0:19 ` manu at gcc dot gnu.org 2015-03-26 2:29 ` hubicka at ucw dot cz 2015-03-26 2:45 ` manu at gcc dot gnu.org 2015-03-26 17:49 ` manu at gcc dot gnu.org 2015-03-27 7:26 ` hubicka at gcc dot gnu.org 2015-03-27 8:11 ` hubicka at gcc dot gnu.org 2015-03-27 8:36 ` hubicka at gcc dot gnu.org 2015-03-27 15:47 ` manu at gcc dot gnu.org 2015-03-27 15:53 ` hubicka at ucw dot cz 2015-03-27 16:32 ` hubicka at ucw dot cz 2015-03-27 16:50 ` manu at gcc dot gnu.org 2015-03-27 19:39 ` hubicka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65536-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).