https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64101
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-*-*, mips64-none-elf Status|UNCONFIRMED |NEW Last reconfirmed| |2014-11-28 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I think the issue is that you don't use the result of erf() and the function is marked as 'const' - thus does not use ATTR_MATHFN_FPROUNDING_ERRNO. If you make 'res' global then it will work.