[Bug libfortran/24945] calling two open statements (same unit) without close fails
kargl at gcc dot gnu dot org
Sun Nov 20 01:16:00 GMT 2005
------- Comment #2 from kargl at gcc dot gnu dot org 2005-11-20 01:16 -------
See 9.3.4 from the standard.
If a unit is connected to a file that exists, execution of an OPEN statement
for that unit is permitted. If the FILE= specifier is not included in such
an OPEN statement, the file to be connected to the unit is the same as the
file to which the unit is already connected.
If the file to be connected to the unit does not exist but is the same as
the file to which the unit is preconnected, the properties specified by
an OPEN statement become a part of the connection.
If the file to be connected to the unit is not the same as the file to
which the unit is connected, the effect is as if a CLOSE statement without
a STATUS= specifier had been executed for the unit immediately prior to th
execution of an OPEN statement.
More information about the Gcc-bugs