diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gcov.c | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83f9b49..09e2831 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-08-01 Martin Liska <mliska@suse.cz> + + PR gcov-profile/81561 + * gcov.c (unblock): Make unblocking safe as we need to preserve + index correspondence of blocks and block_lists. + 2017-08-01 Richard Biener <rguenther@suse.de> PR tree-optimization/81181 @@ -539,13 +539,13 @@ unblock (const block_t *u, block_vector_t &blocked, unsigned index = it - blocked.begin (); blocked.erase (it); - for (block_vector_t::iterator it2 = block_lists[index].begin (); - it2 != block_lists[index].end (); it2++) - unblock (*it2, blocked, block_lists); - for (unsigned j = 0; j < block_lists[index].size (); j++) - unblock (u, blocked, block_lists); + block_vector_t to_unblock (block_lists[index]); block_lists.erase (block_lists.begin () + index); + + for (block_vector_t::iterator it = to_unblock.begin (); + it != to_unblock.end (); it++) + unblock (*it, blocked, block_lists); } /* Find circuit going to block V, PATH is provisional seen cycle. |