diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/value-prof.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2d8ee1..e4b74dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2020-03-11 Jakub Jelinek <jakub@redhat.com> + PR bootstrap/93962 + * value-prof.c (dump_histogram_value): Use abs_hwi instead of + std::abs. + (get_nth_most_common_value): Use abs_hwi instead of abs. + PR middle-end/94111 * dfp.c (decimal_to_binary): Only use decimal128ToString if from->cl is rvc_normal, otherwise use real_to_decimal to print the number to diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 585b909..45677be 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -266,7 +266,7 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) if (hist->hvalue.counters) { fprintf (dump_file, " all: %" PRId64 "%s, values: ", - std::abs ((int64_t) hist->hvalue.counters[0]), + (int64_t) abs_hwi (hist->hvalue.counters[0]), hist->hvalue.counters[0] < 0 ? " (values missing)": ""); for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++) @@ -743,7 +743,7 @@ get_nth_most_common_value (gimple *stmt, const char *counter_type, *count = 0; *value = 0; - gcov_type read_all = abs (hist->hvalue.counters[0]); + gcov_type read_all = abs_hwi (hist->hvalue.counters[0]); gcov_type v = hist->hvalue.counters[2 * n + 1]; gcov_type c = hist->hvalue.counters[2 * n + 2]; |