This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR ipa/58862 (overflow in edge_badness computation)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Teresa Johnson <tejohnson at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>, David Li <davidxl at google dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Wed, 13 Nov 2013 22:40:23 +0100
- Subject: Re: [PATCH] Fix PR ipa/58862 (overflow in edge_badness computation)
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+WYwsMSO63=mf9K16ESzCS74EnT64qjHghgKiWT0XDD_g at mail dot gmail dot com>
> The following fixes PR ipa/58862, which caused failures in lto
> profiledbootstrap and in several spec cpu2006 profile-use builds.
>
> Bootstrapped and tested on x86-64-unknown-linux-gnu. Also ensured that
> it fixed the lto profiledbootstrap and cpu2006 failures. Ok for trunk?
>
> Thanks,
> Teresa
>
> 2013-11-13 Teresa Johnson <tejohnson@google.com>
>
> PR ipa/58862
> * ipa-inline.c (edge_badness): Fix overflow.
OK,
thanks!
Honza
>
> 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 Johnson | Software Engineer | tejohnson@google.com | 408-460-2413