This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, fortran testsuite] read_eof.f90 open file bug
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Thomas Koenig <Thomas dot Koenig at online dot de>,David Edelsohn <dje at watson dot ibm dot com>,gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Dec 2004 14:42:33 +0000
- Subject: Re: [PATCH, fortran testsuite] read_eof.f90 open file bug
- Organization: CodeSourcery
- References: <200412291610.iBTGA1D10712@makai.watson.ibm.com> <20041230122244.GA4416@meiner.onlinehome.de>
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