The test gfortran.dg/namelist_97.f90 dos not clean the file test.dat
Bernhard Reutner-Fischer
rep.dot.nop@gmail.com
Mon Jun 8 16:51:27 GMT 2020
On Mon, 08 Jun 2020 13:52:08 +0200
dhumieres.dominique@free.fr wrote:
> >> Any idea how to clean the file? Meanwhile it could better to rename
> >> the file, say 'namelist_97.dat'.
> >>
> > program test
> > character(*), parameter :: my_form = "unformatted"
> > character(*), parameter :: scratch = "scratch"
> > integer :: i = 1, j = 2, k = 3
> > namelist /nml1/ i, j, k
> > open(unit=10, form=my_form, status=scratch)
> > write(10, nml=nml1)
> > close (unit=10)
> > end program test
> >
> > should do the job unless there's any need to have a named file...
>
> That seems to work. Thanks.
If this does not compromise the initial test then sure.
Otherwise something like:
! { dg-final { remote_file build delete "test.dat" } }
(and yes, choosing more accurate namelist files is certainly a good
thing. Of course tests should always cleanup after themselves anyway)
HTH,
More information about the Fortran
mailing list