https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #6 from Gabriel Ravier <gabravier at gmail dot com> --- Also the second example wasn't misoptimized, on the contrary it was the most reasonable portable function I could write that would work equivalently to the first *and* that GCC would optimize ideally.