From 6c2b4cacb93fbc4962d1f82d377af6e68def21a9 Mon Sep 17 00:00:00 2001 From: Jan Hubicka <jh@suse.cz> Date: Thu, 15 Nov 2012 02:07:01 +0100 Subject: [PATCH] re PR bootstrap/55051 (profiledbootstrap failed) PR bootstrap/55051 * gcov-io.c (gcov_read_summary): Fix array bound check. From-SVN: r193522 --- gcc/ChangeLog | 5 +++++ gcc/gcov-io.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee4d129d1b32..c27ce1638db3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-14 Jan Hubicka <jh@suse.cz> + + PR bootstrap/55051 + * gcov-io.c (gcov_read_summary): Fix array bound check. + 2012-11-14 Sterling Augustine <saugustine@google.com> PR debug/55328 diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index f5626542521f..109401c62b5e 100644 --- a/gcc/gcov-io.c +++ b/gcc/gcov-io.c @@ -552,8 +552,8 @@ gcov_read_summary (struct gcov_summary *summary) while (!cur_bitvector) { h_ix = bv_ix * 32; + gcc_assert(bv_ix < GCOV_HISTOGRAM_BITVECTOR_SIZE); cur_bitvector = histo_bitvector[bv_ix++]; - gcc_assert(bv_ix <= GCOV_HISTOGRAM_BITVECTOR_SIZE); } while (!(cur_bitvector & 0x1)) { -- GitLab