diff options
author | Martin Liska <mliska@suse.cz> | 2020-09-25 16:21:34 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-09-25 16:26:19 +0200 |
commit | 1921ebcaf6467996aede69e1bbe32400d8a20fe7 (patch) | |
tree | 2855e95412d37d53ae0d06f2d0cbb9f03744aeb8 | |
parent | a28542df4d069d9937070b5456a54d5e10bcfe56 (diff) | |
download | gcc-1921ebcaf6467996aede69e1bbe32400d8a20fe7.zip gcc-1921ebcaf6467996aede69e1bbe32400d8a20fe7.tar.gz gcc-1921ebcaf6467996aede69e1bbe32400d8a20fe7.tar.bz2 |
gcov: fix streaming of HIST_TYPE_IOR histogram type.
gcc/ChangeLog:
PR gcov-profile/64636
* value-prof.c (stream_out_histogram_value): Allow negative
values for HIST_TYPE_IOR.
-rw-r--r-- | gcc/value-prof.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index ea1b1a8..95d33c6 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -331,7 +331,10 @@ stream_out_histogram_value (struct output_block *ob, histogram_value hist) /* When user uses an unsigned type with a big value, constant converted to gcov_type (a signed type) can be negative. */ gcov_type value = hist->hvalue.counters[i]; - if (hist->type == HIST_TYPE_TOPN_VALUES) + if (hist->type == HIST_TYPE_TOPN_VALUES + || hist->type == HIST_TYPE_IOR) + /* Note that the IOR counter tracks pointer values and these can have + sign bit set. */ ; else gcc_assert (value >= 0); |