This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, fortran testsuite] read_eof.f90 open file bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]