aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorDaniel Berlin <dan@cgsoftware.com>2001-10-31 03:01:17 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2001-10-31 03:01:17 +0000
commit87a2e7a8a5adda2f12d3b4fa47122dd0a7831138 (patch)
tree34c98264abab39b8f7ee99086154c5118ff169f9 /gcc/bitmap.c
parentec3fd6be49164d13e2cc5ee40b73120c6badeff6 (diff)
downloadgcc-87a2e7a8a5adda2f12d3b4fa47122dd0a7831138.zip
gcc-87a2e7a8a5adda2f12d3b4fa47122dd0a7831138.tar.gz
gcc-87a2e7a8a5adda2f12d3b4fa47122dd0a7831138.tar.bz2
bitmap.c (bitmap_element_free): Don't forget to update head->indx when we update head->current.
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
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 33cc535..b735d14 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -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;