https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96558
--- Comment #1 from Arseny Solokha <asolokha at gmx dot com> --- The internal loop can be simplified a bit: do { long int lf = (long int) f1 ? h1 : 0; ky += lf; vh = lf | f1; f1 = 1; } while (vh < (f1 ^ 2));