public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <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: Fri, 08 Feb 2013 09:07:00 -0000	[thread overview]
Message-ID: <bug-56231-4-mLuIuxBqp8@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 #6 from rguenther at suse dot de <rguenther at suse dot de> 2013-02-08 09:07:09 UTC ---
On Thu, 7 Feb 2013, manu at gcc dot gnu.org wrote:

> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231
> 
> Manuel L?pez-Ib??ez <manu at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |manu at gcc dot gnu.org
> 
> --- Comment #5 from Manuel L?pez-Ib??ez <manu at gcc dot gnu.org> 2013-02-07 19:10:17 UTC ---
> /* Reason for creating a new line map with linemap_add.  LC_ENTER is
>    when including a new file, e.g. a #include directive in C.
>    LC_LEAVE is when reaching a file's end.  LC_RENAME is when a file
>    name or line number changes for neither of the above reasons
>    (e.g. a #line directive in C); LC_RENAME_VERBATIM is like LC_RENAME
>    but a filename of "" is not specially interpreted as standard
>    input. LC_ENTER_MACRO is when a macro expansion is about to start.  */
> 
> So perhaps the secret is to use just LC_ENTER?

Hmm, I guessed that eventually the "included from" stuff is
built by nesting LC_ENTER w/o LC_LEAVE, so that probably makes it worse.

At least I see we do an initial

  linemap_add (line_table, LC_ENTER, 0, NULL, 0);

which might explain the single "included from" with bogus info.
But ISTR other frontends do sth similar.  Though now I'm curious
what breaks if we remove the above from lto/lto-lang.c


  parent reply	other threads:[~2013-02-08  9:07 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
2013-02-07 19:10 ` manu at gcc dot gnu.org
2013-02-08  9:07 ` rguenther at suse dot de [this message]
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-mLuIuxBqp8@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).