------- Additional Comments From greenrd at greenrd dot org 2005-06-26 12:39 ------- The problem is that a PersistentByteMap of capacity 1 is created by -m, but when a PersistentByteMap is created with capacity 1, its capacity method incorrectly returns 0.
This is because, when it is created, confusingly, the capacity field is set to (int) (capacity*3/2),which in this case is 1, and the capacity() method then returns (int) (the capacity field * 2 / 3), which is (int) (2 * 1 / 3) = 0. The first thing I would do is, we have 3 things (initial capacity, capacity field, capacity method), all with the same name, but not meaning the same thing, so I would do some renames to avoid confusion. Then I would fix the actual bug. Preparing a patch. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |greenrd at greenrd dot org |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22189