gfortran.dg/pr16597.f90 leaves behind a file (bug?)
Billinghurst, David (CALCRTS)
david.billinghurst@comalco.riotinto.com.au
Wed Mar 22 23:10:00 GMT 2006
> From: Kaveh R. Ghazi
>
> > The testcase should probably have a STATUS='SCRATCH' added.
>
> Err, but it does. There are two open/close pairs, the second one
> opens fort.99 with STATUS='SCRATCH'. Perhaps I'm exposing my neophyte
> fortran i/o skills, but shouldn't that cause fort.99 to be deleted
> when the file is closed?
>
You are correct. Fortran 95 9.3.5 says
At termination of execution of a program for reasons other than an
error condition, all units that are connected are closed. Each unit
is closed with status KEEP unless the file status prior to termination
of execution was SCRATCH, in which case the unit is closed with
status DELETE.
The statement
CLOSE(UNIT=99,STATUS='DELETE')
should force the deletion the file
NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.
More information about the Fortran
mailing list