public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/43298]  New: fortran library does not read in NaN -Inf or Inf
@ 2010-03-08 21:14 jjcogliati-r1 at yahoo dot com
  2010-03-08 21:17 ` [Bug libfortran/43298] " jjcogliati-r1 at yahoo dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: jjcogliati-r1 at yahoo dot com @ 2010-03-08 21:14 UTC (permalink / raw)
  To: gcc-bugs

As I understand it, fortran should be able to read in a NaN or Inf value.
See 10.6.1.2.1 F editing in the Fortran 2003 specification.  This is a new
Fortran 2003 feature and is not in the Fortran 95 specification.

gfortran properly prints out the NaN values, but cannot read them in, thus
causing the following program to fail:

program nan_test         
  character(15) :: nan = '  NAN -INF  INF'
  real :: a,b,c, d = 0.0

  print ('(3F5.2)'),0.0/d,-1.0/d,1.0/d
  read (nan,'(3F5.2)'),a,b,c
  print *,f

end program nan_test

I have tried with both 4.5.0 20100121 and 4.4.3.


-- 
           Summary: fortran library does not read in NaN -Inf or Inf
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jjcogliati-r1 at yahoo dot com


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


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

end of thread, other threads:[~2010-07-02 21:16 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 21:14 [Bug libfortran/43298] New: fortran library does not read in NaN -Inf or Inf jjcogliati-r1 at yahoo dot com
2010-03-08 21:17 ` [Bug libfortran/43298] " jjcogliati-r1 at yahoo dot com
2010-03-09  2:38 ` jvdelisle at gcc dot gnu dot org
2010-03-09  7:24 ` burnus at gcc dot gnu dot org
2010-03-12 12:31 ` burnus at gcc dot gnu dot org
2010-03-12 17:05 ` burnus at gcc dot gnu dot org
2010-04-26  4:45 ` jvdelisle at gcc dot gnu dot org
2010-06-27 19:46 ` jvdelisle at gcc dot gnu dot org
2010-06-28  9:09 ` burnus at gcc dot gnu dot org
2010-06-28 19:15 ` jvdelisle at gcc dot gnu dot org
2010-06-28 20:05 ` burnus at gcc dot gnu dot org
2010-06-30  1:36 ` jvdelisle at gcc dot gnu dot org
2010-06-30  1:39 ` jvdelisle at gcc dot gnu dot org
2010-06-30  8:06 ` burnus at gcc dot gnu dot org
2010-07-02  0:12 ` danglin at gcc dot gnu dot org
2010-07-02  7:10 ` burnus at gcc dot gnu dot org
2010-07-02 15:19 ` jvdelisle at gcc dot gnu dot org
2010-07-02 19:07 ` burnus at gcc dot gnu dot org
2010-07-02 21:16 ` jvdelisle 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).