public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/98599] fatal error: Cgraph edge statement index out of range with -Os -flto -fanalyzer
Date: Wed, 13 Jan 2021 10:31:09 +0000	[thread overview]
Message-ID: <bug-98599-4-lI8n5Ox4PI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98599-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98599

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #4)
> I set them so that each stmt has a unique id, unique across all functions. 
> I was assuming from the comments I quoted above in gimple.h that this is
> safe to do, but it sounds like from your comment that WPA makes assumptions
> that the uids don't change.  If that's the case, then I need to rethink
> things, and the gimple.h comments probably need updating (or WPA needs to
> allow for uids to change, but maybe that's hard to do?)

So looking into the code, in WPA when we stream out cgraph_edge, we record to
which GIMPLE statement an edge points to:

gcc/lto-cgraph.c:264-265

and the info is later used in LTRANS where you see the fatal_error.

So I would recommend using a separate table where you will assign a unique ID
to statements. And please update the comment in gimple.h.

  parent reply	other threads:[~2021-01-13 10:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 10:59 [Bug analyzer/98599] New: " acoplan at gcc dot gnu.org
2021-01-08 16:36 ` [Bug analyzer/98599] " dmalcolm at gcc dot gnu.org
2021-01-08 23:56 ` dmalcolm at gcc dot gnu.org
2021-01-11 12:47 ` marxin at gcc dot gnu.org
2021-01-11 16:29 ` dmalcolm at gcc dot gnu.org
2021-01-12 13:27 ` marxin at gcc dot gnu.org
2021-01-12 23:26 ` dmalcolm at gcc dot gnu.org
2021-01-13 10:31 ` marxin at gcc dot gnu.org [this message]
2021-01-13 18:38 ` dmalcolm at gcc dot gnu.org
2021-01-13 22:09 ` dmalcolm at gcc dot gnu.org
2021-03-11 18:04 ` dmalcolm at gcc dot gnu.org
2021-03-31 18:28 ` dmalcolm at gcc dot gnu.org
2021-04-10 17:42 ` [Bug analyzer/98599] [11 Regression] " dmalcolm at gcc dot gnu.org
2021-04-13  1:15 ` cvs-commit at gcc dot gnu.org
2021-04-13  1:16 ` dmalcolm at gcc dot gnu.org
2021-04-13  7:55 ` hubicka at ucw dot cz
2021-04-13  9:09 ` acoplan at gcc dot gnu.org
2021-04-13 18:26 ` dmalcolm at gcc dot gnu.org
2021-04-15  9:41 ` cvs-commit 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-98599-4-lI8n5Ox4PI@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).