------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-12-01 03:55 ------- read( 50, *, pos = 1 )
is valid only if the unit has been connected for STREAM access. F2003 "9.5.1.10 POS= specifier in a data transfer statement The POS= specifier specifies the file position in file storage units. This specifier may appear in a data transfer statement only if the statement specifies a unit connected for stream access. A child data transfer statement shall not specify this specifier." So the read statement by itself is invalid. However, we should generate better error message for this case. I have a patch on the way. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38291