This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-04-14 03:10 -------
My interpretation of the standard as quoted in the original post.

The value of POSITION can only be APPEND if we are positioned just before the
EOF record or if there is no EOF record and the position is at it's terminating
point.  In the case given, there is an EOF record, so that rules that part out.

The question then is after the first read, what is the position?  The position
after the first read is just before the EOF record.  So the POSITION in this
case should be APPEND.

To fix this, we can have the INQUIRE statement attempt to read one more byte. 
If it is successful, we back up one byte and report ASIS.  If we get an EOF
trying to read the one more byte, the we report APPEND.


-- 


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


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