This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gfortran
- From: Bud Davis <bdavis9659 at sbcglobal dot net>
- To: Seijo Kruizinga <s dot kruizinga at hccnet dot nl>, gcc-help at gcc dot gnu dot org
- Date: Wed, 21 Mar 2007 20:15:51 -0700 (PDT)
- Subject: Re: gfortran
--- Seijo Kruizinga <s.kruizinga@hccnet.nl> wrote:
> L.S.
>
> I recently downloaded the latest version of gfortran
> (4.3.0). In general it
> works very well. I met, however, a curious problem.
> When I tried to open a
> file twice with different unit-numbers I got an
> error message during
> running. (I try to read the files synchron with a
> records spacing). In f77
> this was allowed. I can imagine some problems if you
> use then read/write.
> But even with status'='OLD' it was refused. I use it
> under Suse 10.0.
>
> Thanks for your help,
>
> Seijo Kruizinga
>
>
is this an example of your problem:
$ cat b.f
open(unit=20,file='b.f')
open(unit=30,file='b.f')
print*,'ok'
end
$ g77 b.f
$ ./a.out
ok
$ gfortran -static b.f
$ ./a.out
At line 2 of file b.f
Fortran runtime error: File already opened in another
unit
--bud