PR gcov-profile/55674
* lto-cgraph.c (merge_profile_summaries): Set min correctly the
first time we merge into a histogram entry.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194502
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-12-14 Teresa Johnson <tejohnson@google.com>
+
+ PR gcov-profile/55674
+ * lto-cgraph.c (merge_profile_summaries): Set min correctly the
+ first time we merge into a histogram entry.
+
2012-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/55684
so we need to account for a non-zero histogram entry at new_ix. */
unsigned new_ix = gcov_histo_index (scaled_min);
lto_gcov_summary.histogram[new_ix].min_value
- = MIN (lto_gcov_summary.histogram[new_ix].min_value, scaled_min);
+ = (lto_gcov_summary.histogram[new_ix].num_counters
+ ? MIN (lto_gcov_summary.histogram[new_ix].min_value, scaled_min)
+ : scaled_min);
/* Some of the scaled counter values would ostensibly need to be placed
into different (larger) histogram buckets, but we keep things simple
here and place the scaled cumulative counter value in the bucket