[Bug libfortran/19114] New: runtime error when reading complex*16 using formatted I/O

2004-12-21 Thread rmunk at quake dot stanford dot edu
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.E+00 0.E+00 2.52505826E-01 0.E+00 1.44380768E-04
-1.11464849E-18 1.01002561E-01 0.E+00-2.52507036E-02 0.E+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=19114


[Bug libfortran/19114] runtime error when reading complex*16 using formatted I/O

2004-12-21 Thread rmunk at quake dot stanford dot edu

--- Additional Comments From rmunk at quake dot stanford dot edu  
2004-12-21 22:12 ---
Subject: Re:  runtime error when reading complex*16
using formatted I/O

Oops! Sorry about that.

Rasmus


On Tue, 2004-12-21 at 10:51, pinskia at gcc dot gnu dot org wrote:
 --- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-21 
 18:51 ---
 Hmm, did you accidently reload the commit page?
 
 *** This bug has been marked as a duplicate of 19064 ***


-- 


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


[Bug libfortran/19064] New: runtime error when reading complex*16 using formatted I/O

2004-12-17 Thread rmunk at quake dot stanford dot edu
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.E+00 0.E+00 2.52505826E-01 0.E+00 1.44380768E-04
-1.11464849E-18 1.01002561E-01 0.E+00-2.52507036E-02 0.E+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