This is with x86_64-unknown-linux-gnu with glibc-2.6.1.

Run-time-lib follow up for compile-time PR 34192.

The following program should print as third number a 0.0, but it does not do
so:
  4.94065645841246544E-324
  9.88131291682493088E-324
  9.88131291682493088E-324

program test
  implicit none
  real(8), volatile :: r8
  r8 = 0.0_8
  print *, nearest(r8, 1.0)
  print *, nearest(nearest(r8, 1.0), 1.0)
  print *, nearest(nearest(r8, 1.0),-1.0)
end program test


-- 
           Summary: run-time lib: NEAREST(0.0_8, -1.0) produces wrong
                    numbers
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
GCC target triplet: x86_64-unknown-linux-gnu
OtherBugsDependingO 32834
             nThis:


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

Reply via email to