bitmap.c (bitmap_element_free): Don't forget to update head->indx when we update...
authorDaniel Berlin <dan@cgsoftware.com>
Wed, 31 Oct 2001 03:01:17 +0000 (03:01 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Wed, 31 Oct 2001 03:01:17 +0000 (03:01 +0000)
2001-10-30  Daniel Berlin  <dan@cgsoftware.com>

* bitmap.c (bitmap_element_free): Don't forget to update head->indx
when we update head->current.

From-SVN: r46669

gcc/ChangeLog
gcc/bitmap.c

index 9e117aa2cabe56c1772be22122fe2def357af065..0f2c0b5b838538da9d66b746b005a8eff3115658 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-30  Daniel Berlin  <dan@cgsoftware.com>
+
+       * bitmap.c (bitmap_element_free): Don't forget to update head->indx
+       when we update head->current.
+
 2001-10-30  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * tree.c (id_string_size): Remove.
index 33cc535fe0b0e2af5bbfc3a6a04ef52816c29c75..b735d1409d0b276069e077ac6e84d1f11eb7f7fb 100644 (file)
@@ -70,7 +70,11 @@ bitmap_element_free (head, elt)
   /* Since the first thing we try is to insert before current,
      make current the next entry in preference to the previous.  */
   if (head->current == elt)
-    head->current = next != 0 ? next : prev;
+    {
+      head->current = next != 0 ? next : prev;
+      if (head->current)
+       head->indx = head->current->indx;
+    }
 
   elt->next = bitmap_free;
   bitmap_free = elt;