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/34230] Expressions of parameters evaluated with too high precision



------- Comment #4 from terry at chem dot gu dot se  2007-11-27 22:56 -------
(In reply to comment #3)

(Admittedly from the 4.2.2 manual):
2.2 Options controlling Fortran dialect
-frange-check
    Enable range checking on results of simplification of constant expressions
during compilation. For example, by default, GNU Fortran will give an overflow
error at compile time when simplifying a = EXP(1000). With -fno-range-check, no
error will be given and the variable a will be assigned the value +Infinity.
Similarly, DATA i/Z'FFFFFFFF'/ will result in an integer overflow on most
systems, but with -fno-range-check the value will ?wrap around? and i will be
initialized to -1 instead. 


That seems pretty explicit about what the option is supposed to be doing.

Referring to compiler output agreeing with itself is not a particularly strong
argument.

Surely it's reasonable for the programmer to assume that if y is +Inf, than
log(y) will be also.  (Though I can see this degenerating into a discussion
about -ffloat-store.)


-- 


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


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