diff options
author | Jan Hubicka <jh@suse.cz> | 2013-03-29 00:31:58 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-03-28 23:31:58 +0000 |
commit | be77e1e56243bcb64028f801154160826f3a91bf (patch) | |
tree | 8c9507d1cb69cf9ffc8d85b466f15910da5916c0 | |
parent | eab19a1a95cfba787426931c9cb264a50f4983e4 (diff) | |
download | gcc-be77e1e56243bcb64028f801154160826f3a91bf.zip gcc-be77e1e56243bcb64028f801154160826f3a91bf.tar.gz gcc-be77e1e56243bcb64028f801154160826f3a91bf.tar.bz2 |
* lto-cgraph.c (merge_profile_summaries): Fix overflows.
From-SVN: r197218
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto-cgraph.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 858d96e..67d1184 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-03-28 Jan Hubicka <jh@suse.cz> + + * lto-cgraph.c (merge_profile_summaries): Fix overflows. + 2013-03-28 Ian Bolton <ian.bolton@arm.com> * config/aarch64/aarch64.md (aarch64_can_eliminate): Keep frame diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index d9d798a..6d639a9 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1362,8 +1362,8 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec) { /* Scale up the min value as we did the corresponding sum_all above. Use that to find the new histogram index. */ - int scaled_min = RDIV (saved_profile_info->histogram[h_ix].min_value - * saved_scale, REG_BR_PROB_BASE); + gcov_type scaled_min = RDIV (saved_profile_info->histogram[h_ix].min_value + * saved_scale, REG_BR_PROB_BASE); /* The new index may be shared with another scaled histogram entry, so we need to account for a non-zero histogram entry at new_ix. */ unsigned new_ix = gcov_histo_index (scaled_min); |