[Bug ipa/58862] [4.9 Regression] LTO profiledbootstrap failure: lto1: ICE in edge_badness, at ipa-inline.c:1008

tejohnson at google dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 12 15:49:00 GMT 2013


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

--- Comment #19 from Teresa Johnson <tejohnson at google dot com> ---
On Mon, Nov 4, 2013 at 11:11 AM, tejohnson at google dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58862
>
> --- Comment #18 from Teresa Johnson <tejohnson at google dot com> ---
> Just hit this same error with cpu2006 bzip2. The .i and .gcda are attached.
> Reproduce with:
>
> gcc -c -fprofile-use -O2 blocksort.i
>
> blocksort.c:1136:1: internal compiler error: in edge_badness, at
> ipa-inline.c:1011
>  }
>  ^
> 0xe13caa edge_badness
>     /usr/local/google/home/tejohnson/gcc_trunk_1/gcc/ipa-inline.c:1011
> 0xe16935 update_edge_key
>     /usr/local/google/home/tejohnson/gcc_trunk_1/gcc/ipa-inline.c:1024
> 0xe16935 inline_small_functions
>     /usr/local/google/home/tejohnson/gcc_trunk_1/gcc/ipa-inline.c:1610
> 0xe16935 ipa_inline
>     /usr/local/google/home/tejohnson/gcc_trunk_1/gcc/ipa-inline.c:2015
> 0xe16935 execute
>     /usr/local/google/home/tejohnson/gcc_trunk_1/gcc/ipa-inline.c:2385
> Please submit a full bug report,
>
>
> Teresa

Since this was blocking my SPEC testing I took a look. The issue is
that the new edge_count variable is declared as an int and is
overflowing. It should be gcov_type. Here is the patch that fixed the
bzip2 failure. I will run regression and lto bootstrap testing on it:

2013-11-12  Teresa Johnson  <tejohnson@google.com>

        PR ipa/58862
        * ipa-inline.c (edge_badness): Fix overflow.

Index: ipa-inline.c
===================================================================
--- ipa-inline.c        (revision 204703)
+++ ipa-inline.c        (working copy)
@@ -909,7 +909,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
       /* Capping edge->count to max_count. edge->count can be larger than
         max_count if an inline adds new edges which increase max_count
         after max_count is computed.  */
-      int edge_count = edge->count > max_count ? max_count : edge->count;
+      gcov_type edge_count = edge->count > max_count ? max_count :
edge->count;

       sreal_init (&relbenefit_real, relbenefit, 0);
       sreal_init (&growth_real, growth, 0);


Teresa

>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.



More information about the Gcc-bugs mailing list