public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/19064] New: runtime error when reading complex*16 using formatted I/O
@ 2004-12-18  0:33 rmunk at quake dot stanford dot edu
  2004-12-18  3:48 ` [Bug libfortran/19064] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rmunk at quake dot stanford dot edu @ 2004-12-18  0:33 UTC (permalink / raw)
  To: gcc-bugs

gfortran (snapshot as of 12/17/04) compiled code gives a runtime error when 
reading formatted complex*16 values using the following program:

      program testIO
      implicit none
      integer i
      complex*16 values(5)
     
      open(7,file='test1.dat',status='old')
      read ( 7, '(5E15.8)' ) ( values (i), i = 1, 5 )
      print *, ( values (i), i = 1, 5 )      
      end

The text file "test1.dat" contains:

 2.00000000E+00 0.00000000E+00 2.52505826E-01 0.00000000E+00 1.44380768E-04
-1.11464849E-18 1.01002561E-01 0.00000000E+00-2.52507036E-02 0.00000000E+00

The code was compiled and executed with "gfortran bug.f; a.out", and produced
the following error message:

At line 8 of file bug2.f
Fortran runtime error: End of file

The code works correctly when compiled with g77 and ifort (Intel Fortran),
and produces the output (g77):

 (2.,0.) (0.252505826,0.) (0.000144380768,-1.11464849E-18) (0.101002561,0.)
 (-0.0252507036,0.)


The code and data was extracted from the Harwell-Boeing collection of sparse
matrices, which is a commonly used format for sparse matrix computations.
See http://math.nist.gov/MatrixMarket/collections/hb.html.

Additional information:

"gfortran -v" gives:

Reading specs from
/auto/home0/rmunk/temp_gfortran/irun/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --enable-languages=c,f95
--prefix=/usr/work/2004352/irun
Thread model: posix
gcc version 4.0.0 20041217 (experimental)


Best regards,
  Rasmus Munk Larsen, Stanford University

-- 
           Summary: runtime error when reading complex*16 using formatted
                    I/O
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmunk at quake dot stanford dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-01-07 14:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-18  0:33 [Bug libfortran/19064] New: runtime error when reading complex*16 using formatted I/O rmunk at quake dot stanford dot edu
2004-12-18  3:48 ` [Bug libfortran/19064] " pinskia at gcc dot gnu dot org
2004-12-21 18:51 ` pinskia at gcc dot gnu dot org
2004-12-24  0:29 ` bdavis at gcc dot gnu dot org
2004-12-25  9:34 ` Thomas dot Koenig at online dot de
2004-12-29  7:59 ` bdavis at gcc dot gnu dot org
2005-01-07 14:13 ` pinskia 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).