http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50661
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-08 07:35:25 UTC --- Depends if pointer comparison on the architecture is the same as comparing integer of the same size and if the alignment of the pointer is the same as its size and all bits are significant. E.g. you can't optimize std::equal of say long double that way (e.g. on x86_64 there are 6 bytes of padding in it), but not even float/double (+/-0). Not sure e.g. on s390 31-bit if pointer comparison includes the topmost bit or not.