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/32048] New: max / min and NaN


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


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