https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115374
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Mario Hros from comment #4) > > This bug report is about the strange behavior where GCC doesn't seem to be > using result of the fmod@plt at all. Or am I missing something? Yes you are missing the fmod function will set errno on error. If you don't want to depend on that behavior use -fno-math-errno .