public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34420]  New: List directed reads from file fails
@ 2007-12-10 16:37 eesrjhc at bath dot ac dot uk
  2007-12-10 18:49 ` [Bug fortran/34420] " burnus at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eesrjhc at bath dot ac dot uk @ 2007-12-10 16:37 UTC (permalink / raw)
  To: gcc-bugs

Consider the following example:

$cat myread.f
      integer n, i idmy
      character*2 typ(10)
      character*10 lab(10)
      character*40 wav(10)
      integer pos(10), neg(10), iat(10), ieq(10)
      complex val(10)

      open(10,file='XX',status='old')
      read(10,*,err=950,end=990) n
      do idmy=1,n
        read(10,*,err=950,end=990) i,typ(i),lab(i),
     $       pos(i),neg(i),
     $       ieq(i),wav(i),iat(i),val(i)

        write(*,*)i,typ(i),lab(i),
     $       pos(i),neg(i),
     $       ieq(i),wav(i),iat(i),val(i)

      enddo

      stop
 950  write(*,*)'error reading file'
      stop
 990  write(*,*)'unexpected end of file'
      end


and the file:
$cat XX
     2
      3 'R '  'R1        ' 
      3     48      0
'                                        '      0
(  0.4000000E-05,   0.000000    )
      4 'R '  'RR        ' 
     16     14      0
'                                        '      0
(  0.7830000    ,   0.000000    )


When compiled using GNU Fortran (GCC) 4.3.0 20071209 (experimental)
$ /usr/local/gcc-svn/bin/gfortran myread.f 
$ ./a.out
 error reading file

yet when using the system gfortran (GNU Fortran 95 (GCC) 4.1.2 (Gentoo 4.1.2)
)
I get:
$ gfortran myread.f 
$ ./a.out
           3 R R1                   3          48           0                  
                                 0 ( 4.0000000E-06,  0.000000    )
           4 R RR                  16          14           0                  
                                 0 ( 0.7830000    ,  0.000000    )

which is as expected.

This error has crept in sometime since 01 December, and appears to be in
libgfortran, as programs compiled before 01 December also exhibit this error
when run now, yet did not do so before I did my weekly build of gcc-4.3.0 on 09
December 2007.


-- 
           Summary: List directed reads from file fails
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eesrjhc at bath dot ac dot uk
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/34420] List directed reads from file fails
  2007-12-10 16:37 [Bug fortran/34420] New: List directed reads from file fails eesrjhc at bath dot ac dot uk
@ 2007-12-10 18:49 ` burnus at gcc dot gnu dot org
  2007-12-11  1:01 ` fxcoudert at gcc dot gnu dot org
  2007-12-11 15:03 ` eesrjhc at bath dot ac dot uk
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-12-10 18:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-12-10 18:49 -------
I believe it is a duplicate of PR 34404 and was fixed yesterday. Please update
libgfortran (or the whole GCC) and try again.

Thanks for the report.


-- 


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


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

* [Bug fortran/34420] List directed reads from file fails
  2007-12-10 16:37 [Bug fortran/34420] New: List directed reads from file fails eesrjhc at bath dot ac dot uk
  2007-12-10 18:49 ` [Bug fortran/34420] " burnus at gcc dot gnu dot org
@ 2007-12-11  1:01 ` fxcoudert at gcc dot gnu dot org
  2007-12-11 15:03 ` eesrjhc at bath dot ac dot uk
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-12-11  1:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug fortran/34420] List directed reads from file fails
  2007-12-10 16:37 [Bug fortran/34420] New: List directed reads from file fails eesrjhc at bath dot ac dot uk
  2007-12-10 18:49 ` [Bug fortran/34420] " burnus at gcc dot gnu dot org
  2007-12-11  1:01 ` fxcoudert at gcc dot gnu dot org
@ 2007-12-11 15:03 ` eesrjhc at bath dot ac dot uk
  2 siblings, 0 replies; 4+ messages in thread
From: eesrjhc at bath dot ac dot uk @ 2007-12-11 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from eesrjhc at bath dot ac dot uk  2007-12-11 15:03 -------
Thanks everyone, revision 130775 fixes the problem.


-- 

eesrjhc at bath dot ac dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-12-11 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-10 16:37 [Bug fortran/34420] New: List directed reads from file fails eesrjhc at bath dot ac dot uk
2007-12-10 18:49 ` [Bug fortran/34420] " burnus at gcc dot gnu dot org
2007-12-11  1:01 ` fxcoudert at gcc dot gnu dot org
2007-12-11 15:03 ` eesrjhc at bath dot ac dot uk

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).