This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32048] New: max / min and NaN
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2007 19:57:51 -0000
- Subject: [Bug fortran/32048] New: max / min and NaN
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The test program should consistently return
either 2.1 or NaN:
$ cat foo.f90
program main
real :: nan
nan = 0.0
nan = nan / nan
print *,max(2.1, nan)
print *,max(nan, 2.1)
end program main
$ gfortran foo.f90
$ ./a.out
2.100000
NaN
A lot of compilers seem to get this wrong, as well.
Marking it as an enhancement.
--
Summary: max / min and NaN
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 30694
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32048