Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Bug in gfortran...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 21 Topic 8173 of 8767
Post > Topic >>

Bug in gfortran when reading end of file?

by angelv <txibilis@[EMAIL PROTECTED] > Apr 24, 2008 at 08:05 AM

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]$
 




 21 Posts in Topic:
Bug in gfortran when reading end of file?
angelv <txibilis@[EMAI  2008-04-24 08:05:00 
Re: Bug in gfortran when reading end of file?
utab <umut.tabak@[EMAI  2008-04-24 09:59:49 
Re: Bug in gfortran when reading end of file?
utab <umut.tabak@[EMAI  2008-04-24 10:05:46 
Re: Bug in gfortran when reading end of file?
glen herrmannsfeldt <g  2008-04-24 09:31:48 
Re: Bug in gfortran when reading end of file?
Ron Shepard <ron-shepa  2008-04-24 12:30:14 
Re: Bug in gfortran when reading end of file?
"James Van Buskirk&q  2008-04-24 11:47:04 
Re: Bug in gfortran when reading end of file?
Tobias Burnus <burnus@  2008-04-24 11:14:59 
Re: Bug in gfortran when reading end of file?
Ron Shepard <ron-shepa  2008-04-24 23:38:03 
Re: Bug in gfortran when reading end of file?
Arjen Markus <arjen.ma  2008-04-24 23:41:25 
Re: Bug in gfortran when reading end of file?
"Ron Ford" <  2008-04-25 01:48:50 
Re: Bug in gfortran when reading end of file?
Arjen Markus <arjen.ma  2008-04-25 02:32:40 
Re: Bug in gfortran when reading end of file?
Craig Powers <enigma@[  2008-04-25 14:57:58 
Re: Bug in gfortran when reading end of file?
"Ron Ford" <  2008-04-27 03:22:29 
Re: Bug in gfortran when reading end of file?
Sjouke Burry <burrynul  2008-04-28 03:04:06 
Re: Bug in gfortran when reading end of file?
"Ron Ford" <  2008-04-28 14:46:49 
Re: Bug in gfortran when reading end of file?
angelv <txibilis@[EMAI  2008-04-25 05:32:44 
Re: Bug in gfortran when reading end of file?
"FX" <couder  2008-04-25 14:18:14 
Re: Bug in gfortran when reading end of file?
angelv <txibilis@[EMAI  2008-04-25 05:39:20 
Re: Bug in gfortran when reading end of file?
glen herrmannsfeldt <g  2008-04-25 12:25:31 
Re: Bug in gfortran when reading end of file?
Tobias Burnus <burnus@  2008-04-25 11:39:07 
Re: Bug in gfortran when reading end of file?
Ron Shepard <ron-shepa  2008-04-26 00:01:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:57:08 CDT 2008.