public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/56231] warning traces have bogus line information when using LTO
Date: Thu, 07 Feb 2013 14:35:00 -0000	[thread overview]
Message-ID: <bug-56231-4-PPJy7TcIQc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56231-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-07 14:35:24 UTC ---
(In reply to comment #3)
> (In reply to comment #1)
> > Index: gcc/lto-streamer-in.c
> > ===================================================================
> > --- gcc/lto-streamer-in.c       (revision 195841)
> > +++ gcc/lto-streamer-in.c       (working copy)
> > @@ -164,13 +164,8 @@ lto_input_location (struct bitpack_d *bp
> >      data_in->current_col = bp_unpack_var_len_unsigned (bp);
> > 
> >    if (file_change)
> > -    {
> > -      if (prev_file)
> > -       linemap_add (line_table, LC_LEAVE, false, NULL, 0);
> > -
> > -      linemap_add (line_table, LC_ENTER, false, data_in->current_file,
> > -                  data_in->current_line);
> > -    }
> > +    linemap_add (line_table, LC_RENAME, false, data_in->current_file,
> > +                data_in->current_line);
> >    else if (line_change)
> >      linemap_line_start (line_table, data_in->current_line,
> > data_in->current_col);
> 
> Does not work because of
> 
> const struct line_map *
> linemap_add (struct line_maps *set, enum lc_reason reason,
>              unsigned int sysp, const char *to_file, linenum_type to_line)
> {
> ...
>   /* When we enter the file for the first time reason cannot be
>      LC_RENAME.  */
>   linemap_assert (!(set->depth == 0 && reason == LC_RENAME));
> 
> trying
> 
> Index: gcc/lto-streamer-in.c
> ===================================================================
> --- gcc/lto-streamer-in.c       (revision 195846)
> +++ gcc/lto-streamer-in.c       (working copy)
> @@ -165,11 +165,12 @@ lto_input_location (struct bitpack_d *bp
> 
>    if (file_change)
>      {
> -      if (prev_file)
> -       linemap_add (line_table, LC_LEAVE, false, NULL, 0);
> -
> -      linemap_add (line_table, LC_ENTER, false, data_in->current_file,
> -                  data_in->current_line);
> +      if (!prev_file)
> +       linemap_add (line_table, LC_ENTER, false, data_in->current_file,
> +                    data_in->current_line);
> +      else
> +       linemap_add (line_table, LC_RENAME, false, data_in->current_file,
> +                    data_in->current_line);
>      }
>    else if (line_change)
>      linemap_line_start (line_table, data_in->current_line,
> data_in->current_col);
> 
> we'll still eventually enter a file multiple times that way.  But let's see
> if it makes a difference...

Doesn't make a difference.


  parent reply	other threads:[~2013-02-07 14:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 21:56 [Bug middle-end/56231] New: " matt at use dot net
2013-02-07 10:52 ` [Bug middle-end/56231] " rguenth at gcc dot gnu.org
2013-02-07 13:54 ` rguenth at gcc dot gnu.org
2013-02-07 14:02 ` rguenth at gcc dot gnu.org
2013-02-07 14:35 ` rguenth at gcc dot gnu.org [this message]
2013-02-07 19:10 ` manu at gcc dot gnu.org
2013-02-08  9:07 ` rguenther at suse dot de
2013-02-08 10:10 ` rguenth at gcc dot gnu.org
2013-02-08 10:55 ` rguenth at gcc dot gnu.org
2013-02-08 12:55 ` rguenth at gcc dot gnu.org
2013-02-08 12:56 ` rguenth at gcc dot gnu.org
2013-02-12  1:55 ` matt at use dot net
2013-02-12  2:02 ` matt at use dot net
2013-02-12 11:11 ` rguenther at suse dot de

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-56231-4-PPJy7TcIQc@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: link
Be 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).