aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorMike Stump <mikestump@comcast.net>2014-11-28 22:23:59 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2014-11-28 22:23:59 +0000
commit9e5d3a2c07c230635986fce17f9ddeffcc2de44f (patch)
treed01f7b0471245169ff5b29baf7f7e8b7f69f9cbe /gcc/bitmap.c
parenteef7b18cb7a0b63ff4d260aafcf9f9a3481c5add (diff)
downloadgcc-9e5d3a2c07c230635986fce17f9ddeffcc2de44f.zip
gcc-9e5d3a2c07c230635986fce17f9ddeffcc2de44f.tar.gz
gcc-9e5d3a2c07c230635986fce17f9ddeffcc2de44f.tar.bz2
bitmap.c (bitmap_ior, bitmap_ior_and_compl): Zap current as it could be deleted.
From-SVN: r218173
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 8f7f306..ace6aea 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -1595,6 +1595,8 @@ bitmap_ior (bitmap dst, const_bitmap a, const_bitmap b)
if (dst_elt)
{
changed = true;
+ /* Ensure that dst->current is valid. */
+ dst->current = dst->first;
bitmap_elt_clear_from (dst, dst_elt);
}
gcc_checking_assert (!dst->current == !dst->first);
@@ -1951,6 +1953,8 @@ bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b, const_bitmap k
if (dst_elt)
{
changed = true;
+ /* Ensure that dst->current is valid. */
+ dst->current = dst->first;
bitmap_elt_clear_from (dst, dst_elt);
}
gcc_checking_assert (!dst->current == !dst->first);