* lto-cgraph.c (merge_profile_summaries): Fix overflows.

From-SVN: r197218
This commit is contained in:
Jan Hubicka 2013-03-29 00:31:58 +01:00 committed by Jan Hubicka
parent eab19a1a95
commit be77e1e562
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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);