This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34230] Expressions of parameters evaluated with too high precision
- From: "terry at chem dot gu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2007 22:56:56 -0000
- Subject: [Bug fortran/34230] Expressions of parameters evaluated with too high precision
- References: <bug-34230-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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