diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-28 23:31:58 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-28 23:31:58 +0000 |
commit | ed8b1c1fb76eb2f437317827d85db51ac176f4cd (patch) | |
tree | 8c9507d1cb69cf9ffc8d85b466f15910da5916c0 /gcc/lto-cgraph.c | |
parent | a642efd61c1e3211a16ea7f3010aa30cdf31d0b2 (diff) | |
download | gcc-ed8b1c1fb76eb2f437317827d85db51ac176f4cd.tar.gz |
* lto-cgraph.c (merge_profile_summaries): Fix overflows.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index d9d798a2ade..6d639a9459d 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); |