https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94166
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Oops, I've screwed up, the commit log should have been: reassoc: Avoid code generation to depend on hash_map traversal [PR94166] On the following testcase, if there is ASLR, the compiler generates different code each time (out of 1000 invocations 994 unique assembler contents). The problem is that undistribute_bitref_for_vector uses a hash_map from a tree (SSA_NAME) to a vector and such a hash_map is by default doing pointer hashing on the SSA_NAME rather than using something stable (SSA_NAME_VERSION). One possible way would be to use SSA_NAME_VERSION as hash function, but given that we from the hash_map traversal just populate a vector which is then sorted, I think it is easier to make the sort callback use SSA_NAME_VERSION as secondary sorting key and thus ensure stable sort (that is generally desirable anyway). instead. Sorry.