diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-30 12:00:42 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-30 12:00:42 +0000 |
commit | 2084f25d4c2898bdee68e324dacdce3278699b1d (patch) | |
tree | 9be479df66543cd0fbfc4055e4671cf88c8b127d /gcc/profile.c | |
parent | 8bf47ddea1b9fa2498345da4ee387a178b0a176f (diff) | |
download | gcc-2084f25d4c2898bdee68e324dacdce3278699b1d.tar.gz |
* profile.c (compute_value_histograms): Do not ICE when
there is mismatch only on some counters.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index b8333987e02..4ad7c9f3ab1 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -885,12 +885,16 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum, t = (int) hist->type; aact_count = act_count[t]; - act_count[t] += hist->n_counters; + if (act_count[t]) + act_count[t] += hist->n_counters; gimple_add_histogram_value (cfun, stmt, hist); hist->hvalue.counters = XNEWVEC (gcov_type, hist->n_counters); for (j = 0; j < hist->n_counters; j++) - hist->hvalue.counters[j] = aact_count[j]; + if (aact_count[t]) + hist->hvalue.counters[j] = aact_count[j]; + else + hist->hvalue.counters[j] = 0; } for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++) |