public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31202]  New: wrong code generated with gfortran
@ 2007-03-16 11:27 jv244 at cam dot ac dot uk
  2007-03-16 20:42 ` [Bug fortran/31202] " fxcoudert at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-03-16 11:27 UTC (permalink / raw)
  To: gcc-bugs

With a recent gfortran, the following compiles, but generates the wrong
results:

! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
real*8 :: a
integer*8 :: i1,i2
a=.4999999999999999444888487687421729788184165954589843750_8
i2=NINT(.4999999999999999444888487687421729788184165954589843750_8)
i1=NINT(a)
! 0.499999999999999944488848768742 0 0
write(6,'(F40.30,2I2)') a,i1,i2
IF (i1.NE.i2) CALL ABORT()
a=4503599627370497.0_8
i1=NINT(a,KIND=8)
i2=NINT(4503599627370497.0_8,KIND=8)
! 4503599627370497      4503599627370497      4503599627370497
write(6,*) 4503599627370497_8,i1,i2
IF (i1.NE.i2) CALL ABORT()
END


-- 
           Summary: wrong code generated with gfortran
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-08-05 22:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-16 11:27 [Bug fortran/31202] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
2007-03-16 20:42 ` [Bug fortran/31202] " fxcoudert at gcc dot gnu dot org
2007-03-16 20:55 ` fxcoudert at gcc dot gnu dot org
2007-03-19  1:50 ` [Bug fortran/31202] Incorrect rounding generated for NINT fxcoudert at gcc dot gnu dot org
2007-05-08 22:08 ` fxcoudert at gcc dot gnu dot org
2007-06-29 11:35 ` jv244 at cam dot ac dot uk
2007-06-29 11:45 ` fxcoudert at gcc dot gnu dot org
2007-06-29 16:10 ` kargl at gcc dot gnu dot org
2007-08-03 21:26 ` fxcoudert at gcc dot gnu dot org
2007-08-03 21:27 ` fxcoudert at gcc dot gnu dot org
2007-08-05 13:12 ` cato at df dot lth dot se
2007-08-05 22:05 ` fxcoudert at gcc dot gnu dot org
2007-08-05 22:14 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).