This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch,libgfortran] PR28335 flush() / write() statement on closed units
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Michael Paton <mpaton at swbell dot net>
- Date: Mon, 31 Jul 2006 01:06:54 +0200
- Subject: Re: [patch,libgfortran] PR28335 flush() / write() statement on closed units
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=GUQ59fRmS8pVrWFJ+dnL3ZTisc+z42vsCb+HiOtMewEpwgRIxFJK1JScf8fILIZLVtUszezAdsayNskSW0yh6j48cx7sFypx1SvlGpZU6fpZQBZZRWdJ7M9zQirqn35LxCV8gdb/NZW1mKlPY0EtxJ8x/pbW9XYIiBj3xFUtgus=
- References: <44CD38BD.9060201@swbell.net>
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