[Bug fortran/61933] Inquire on internal units

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 16 15:07:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
You might notice that we redefined existence to be whether or not it is
connected.  Units get connected when opened so your sample code needs only ask:

IF ((.NOT.is_open).AND.(istat == 0)) RETURN

Whether this is what we really want to do of course is open to discussion.

The other definition for existence is .true. for all units except -1 which is
moot because -1 will give an error and the test for existence is always .true.
and not needed.  Also unit existence is processor dependent.

In your opinion, should we change it to the other definition?  Unit existence
is sort of a nebulous situation.  Will your code be more portable without the
test for existence?



More information about the Gcc-bugs mailing list