This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

READ io-implied-do object list


Hi all,

I have some Fortran 90 code from a colleague using another compiler
which uses an implied DO object list in a READ statement. The program
compiles with Intel and PGI compilers, but not gfortran. I've boiled
down the logic into the attached two files. Here is the error (I'm
using GCC 4.4.6):

$ gfortran impdo.f90
impdo.f90:13.34:

      read(55,*,end=384) na,rtemp,((ia(i),ra(i)),i=1,na)
                                  1
Error: Expected variable in READ statement at (1)

(The error is pointing to the first parenthesis, before ia). The
intended operation of the program should read the first line of
in.dat, where na=5 and rtemp=3.14, then the implied DO loop reads na=5
values from 5 lines of in.dat to arrays ia and ra.

I'm not sure if this statement is following any standards (I have
borrowed some terminology in this email from ISO/IEC 1539-1:2010).
Should this be expected to work with gfortran?

-Mike

Attachment: impdo.f90
Description: Binary data

Attachment: in.dat
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]