public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asharif at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
Date: Tue, 24 Jan 2012 01:16:00 -0000	[thread overview]
Message-ID: <bug-51975-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             Bug #: 51975
           Summary: ICE in gcc in convert_move, at expr.c:326 with
                    fprofile-use when source changes from
                    fprofile-generate
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: asharif@gcc.gnu.org


Created attachment 26438
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26438
Tarball containing the test files and the proposed fix.

Please see attached testcase, which fails with gcc-4.6.0:

gcc -o profile_io_data.o profile_io_data.ii -O2 -Wno-error -fpermissive
-fprofile-use -m32 -c

This happens because the profile .gcda file is oudated compared to the current
source. gcc's assignment of function ids on the current source is different
from the assignment when it did fprofile-generate. This causes an ICE later
down the pipeline.

I am also attaching a proposed fix, which builds a hash table of function ids
-> cfg checksums when reading in the profile files. At profile use time, in
check_ic_target(), gcc makes sure the target function's checksum matches the
checksum that is found in the gcda file.


             reply	other threads:[~2012-01-24  0:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24  1:16 asharif at gcc dot gnu.org [this message]
2012-01-24  1:28 ` [Bug gcov-profile/51975] " asharif at gcc dot gnu.org
2012-01-24 22:24 ` asharif at gcc dot gnu.org
2012-01-24 22:30 ` asharif at gcc dot gnu.org
2012-07-22  0:11 ` steven 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-51975-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: 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).