public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
@ 2012-01-24  1:16 asharif at gcc dot gnu.org
  2012-01-24  1:28 ` [Bug gcov-profile/51975] " asharif at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asharif at gcc dot gnu.org @ 2012-01-24  1:16 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gcov-profile/51975] ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
  2012-01-24  1:16 [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate asharif at gcc dot gnu.org
@ 2012-01-24  1:28 ` asharif at gcc dot gnu.org
  2012-01-24 22:24 ` asharif at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: asharif at gcc dot gnu.org @ 2012-01-24  1:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from asharif at gcc dot gnu.org 2012-01-24 00:55:14 UTC ---
Created attachment 26439
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26439
Proposed fix.

Here is just the patch if you want to take a quick look at it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gcov-profile/51975] ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
  2012-01-24  1:16 [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate asharif at gcc dot gnu.org
  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
  3 siblings, 0 replies; 5+ messages in thread
From: asharif at gcc dot gnu.org @ 2012-01-24 22:24 UTC (permalink / raw)
  To: gcc-bugs

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

asharif at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26439|0                           |1
        is obsolete|                            |

--- Comment #2 from asharif at gcc dot gnu.org 2012-01-24 20:01:45 UTC ---
Created attachment 26445
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26445
Proposed fix.

Reused the counts_hash table.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gcov-profile/51975] ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
  2012-01-24  1:16 [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate asharif at gcc dot gnu.org
  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
  3 siblings, 0 replies; 5+ messages in thread
From: asharif at gcc dot gnu.org @ 2012-01-24 22:30 UTC (permalink / raw)
  To: gcc-bugs

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

asharif at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26445|0                           |1
        is obsolete|                            |

--- Comment #3 from asharif at gcc dot gnu.org 2012-01-24 20:10:21 UTC ---
Created attachment 26446
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26446
Proposed fix.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gcov-profile/51975] ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate
  2012-01-24  1:16 [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate asharif at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-01-24 22:30 ` asharif at gcc dot gnu.org
@ 2012-07-22  0:11 ` steven at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu.org @ 2012-07-22  0:11 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-07-22
                 CC|                            |steven at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-07-22 00:11:31 UTC ---
I think the transformation should just be disabled completely if the checksums
don't match. Or if you take this path anyway, you could store the checksums on
the struct function instead of re-computing it for every check.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-22  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24  1:16 [Bug gcov-profile/51975] New: ICE in gcc in convert_move, at expr.c:326 with fprofile-use when source changes from fprofile-generate asharif at gcc dot gnu.org
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

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).