This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
- From: "asharif at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Jan 2012 00:54:30 +0000
- 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
- Auto-submitted: auto-generated
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.