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 fortran/29578] inquire(...) returns formatted=="YES" for unreadable and unformatted files



------- Comment #2 from tobias dot burnus at physik dot fu-berlin dot de  2006-10-24 13:31 -------
I'm actually not any more sure what is meant by "formatted" in
inquire(). The Fortran 2003 standard says:

"The scalar-default-char-variable in the FORMATTED= specifier is
assigned the value YES if FORMATTED is included in the set of allowed
forms for the file, NO if FORMATTED is not included in the set of
allowed forms for the file, and UNKNOWN if the processor is unable to
determine whether or not FORMATTED is included in the set of allowed
forms for the file."

What makes an UNFORMATTED file allowed for FORMATTED access?


Currently, the check is (libgfortran/io/unix.c; inquire_formatted):

Empty string/file does not exist: "UNKNOWN"
Directory: "NO"
Regular file, block device, character device, pipe: "YES".

Is "YES" what one would expect for a binary file? Ifort writes "NO" if
one has open()ed an unformatted file [and simply "UNKNOWN" otherwise].


-- 


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


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