Hi all,
I have found the following problem with gfortran. A minimal code:
PROGRAM TEST
IMPLICIT NONE
INTEGER :: n, i, dat
READ*, n
DO i =3D 1,n
READ*, dat
PRINT*, dat
END DO
END PROGRAM TEST
And an input file (note that the file does not end in a newline):
[angelv@[EMAIL PROTECTED]
~/temp]$ cat test.input
3
45
567
8945[angelv@[EMAIL PROTECTED]
~/temp]$
Now, Intel Fortran and PGI have no problems with that, but gfortran
re****ts and End of file, as it can be seen below. What "should" be the
correct behaviour? Thought of asking here before re****ting it as a bug
to gfortran.
Thanks,
=C1ngel
[angelv@[EMAIL PROTECTED]
~/temp]$ ifort -o test test.f90
[angelv@[EMAIL PROTECTED]
~/temp]$ ./test < test.input
45
567
8945
[angelv@[EMAIL PROTECTED]
~/temp]$ pgf95 -o test test.f90
[angelv@[EMAIL PROTECTED]
~/temp]$ ./test < test.input
45
567
8945
[angelv@[EMAIL PROTECTED]
~/temp]$ gfortran -o test test.f90
[angelv@[EMAIL PROTECTED]
~/temp]$ ./test < test.input
45
567
At line 8 of file test.f90
Fortran runtime error: End of file
[angelv@[EMAIL PROTECTED]
~/temp]$


|