http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51727
--- Comment #15 from Tobias Schlüter <tobi at gcc dot gnu.org> 2012-10-11 14:01:27 UTC --- I'm sorry that I'm spamming your inboxes, but I only now read the comment in front of write_symbol1, and it says something that I was wondering about all this time, so I want to at least have this recorded. The comment says: """ The act of writing a symbol can modify the pointer_info tree, so we cease traversal if we find a symbol to write. """ This has not been the case since 2007, even though it appears to make a lot of sense: if symbols are added to the balanced binary tree during symbol writing, it can happen that the layout of the tree changes. I don't think elements can be removed from the tree during symbol writing, so the code wouldn't fail (as for all we know it didn't), but it would traverse the tree in an unpredictable order. With my patch, the situation certainly doesn't become worse, but it would be preferable to have a two-step mechanism, where first all necessary symbols are identified, and then written instead of the current intermingled process. This would also allow writing the symbols in strictly numerical order. I don't know how much surgery this would require.