]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* lto-cgraph.c (merge_profile_summaries): Fix overflows.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2013 23:31:58 +0000 (23:31 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2013 23:31:58 +0000 (23:31 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197218 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lto-cgraph.c

index 858d96ebd98d171ff5fb13cc958381e55664ca5a..67d1184f21a09fe61e86c7de7e82184ff19b45f1 100644 (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
index d9d798a2ade3b634c92a406b6ed746237d86a419..6d639a9459d2f5274a5132d6744b0b7a3afdf625 100644 (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);