https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69308
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Maybe you're encountering one of the known bugs where on some architectures GCC wrongly generated unordered comparison instructions for ordered comparisons.