File: gcc/libjava/java/util/LinkedHashMap.java CVS Version: 1.6 When using "accessOrder"-based sorting in LinkedHashMap, the linked list appears to become broken after calling get(). I believe that this is due to a missing line in the access() function. I believe that the following line needs to be added after line 188:
root.pred = this; This will relink "root.pred" to the "this" object which has been moved to the "tail" of the linked list. Otherwise, root.pred will point to the 2nd-from-the-tail element which breaks the semantics of the linked list used in the class. I will post some test code that exposes this problem shortly. -- Summary: LinkedHashMap breaks linked list when access() is called Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: soleger at nc dot rr dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org,mckinlay at redhat dot com GCC build triplet: i386-redhat-linux GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273