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

Re: [patch,libgfortran] PR28335 flush() / write() statement on closed units


On Monday 31 July 2006 00:54, Michael Paton wrote:
> I've just run across the effects of this in the 20060729 snapshot, where
> previously working code got runtime errors. It seems that Jerry's patch
> makes it an error to attempt to CLOSE a unit which has not been OPENED, or
> "associated". My reading of the f77 standard and a late draft of the 2003
> standard show this to be explicitly permitted.

Do you have a pointer to a paragraph in the standard?

> I'll also confess to some brief irritation at the error text, "Can't find
> specified UNIT in CLOSE".  

That happens because generate_error does not handle output of non-constant
strings.  The error is issued from libgfortran/io/close.c:st_close(), and
the unit number there is known to be clp->common.unit, IIUC.  But, as I
said, it appears that there currently is no way to output that number.

Gr.
Steven


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