Mercurial > hg > CbC > CbC_gcc
diff gcc/statistics.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
line wrap: on
line diff
--- a/gcc/statistics.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/statistics.c Fri Feb 12 23:39:51 2010 +0900 @@ -82,7 +82,10 @@ static htab_t curr_statistics_hash (void) { - unsigned idx = current_pass->static_pass_number; + unsigned idx; + + gcc_assert (current_pass->static_pass_number >= 0); + idx = current_pass->static_pass_number; if (idx < nr_statistics_hashes && statistics_hashes[idx] != NULL) @@ -294,9 +297,12 @@ || incr == 0) return; - counter = lookup_or_add_counter (curr_statistics_hash (), id, 0, false); - gcc_assert (!counter->histogram_p); - counter->count += incr; + if (current_pass->static_pass_number != -1) + { + counter = lookup_or_add_counter (curr_statistics_hash (), id, 0, false); + gcc_assert (!counter->histogram_p); + counter->count += incr; + } if (!statistics_dump_file || !(statistics_dump_flags & TDF_DETAILS))