[PATCH, fortran testsuite] read_eof.f90 open file bug
Paul Brook
paul@codesourcery.com
Thu Dec 30 18:37:00 GMT 2004
On Thursday 30 December 2004 12:22, Thomas Koenig wrote:
> David Edelsohn wrote:
> > read_eof.f90 consistently fails on AIX during nightly testsing,
> > but not when run manually. Adding additional debugging statements to
> > new_unit() shows that it is failing because file /dev/null already is
> > open as unit 5. Unit 5 is associated with stdin and stdin is /dev/null
> > when not associated with a terminal.
>
> Stupid question: Why should opening /dev/null twice fail?
Section 9.3.2:
"A unit shall not be connected to more than one file at the same time, and a
file shall not be connected to more than one unit at the same time"
You could argue that /dev/null is a special case, and we should allow opening
it multiple times as an extension.
It's easier to just fix the testcase. As a side-effect the test now works on
systems which don't have /dev/null.
Paul
More information about the Fortran
mailing list