This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.



------- Comment #8 from uros at kss-loka dot si  2006-10-25 11:48 -------
(In reply to comment #7)

> Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L}
> and BUILT_IN_FMOD{F,,L} are always available, right?

Yes. The expansion does not depend on -ffast-math anymore. However, the named
pattern should be present in .md files. Currently, i386 provides named pattern
for -mfpmath=387, but not for -mfpmath=sse. In the later case, expansion will
fall-back to normal library call.

> gfortran doesn't have a need for errno to be set after math functions are
> called. However, we do want that have "correct" results in all cases: Inf,
> NaN, subnormals, etc. From my reading of the manual, -fno-math-errno would
> imply that we do not get such correct results, am I right?

Fortunatelly, no. The result will be correct. You can see the effect of
-fno-math-errno at http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01158.html.
Fixup code detects NaN (as an abnormal return from builtin funcion) and calls
library function in order to set global variable errno. If global variable
errno is not needed (as I suspect is the case with fortran libraries), fixup
code is not needed, so -fno-math-errno shoul be used.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]