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: [Fwd: (j3.2006) Fortran 2003 compiler features]


On Mon, Feb 05, 2007 at 01:52:00PM +0100, Fran?ois-Xavier Coudert wrote:
> >I clearly don't know the issues involved by recursive IOs, but for the
> >test I have given in pr30617 the recursivity is only due to how the code
> >is translated in the from end.
> 
> That's not true. Recursive I/O is defined by whether the Fortran
> standard says it's recursive. In the case of PR30617, to my knowledge,
> it *is* recursive I/O. Period.

Yes it is recursive IO and the Fortran 95 says that it is invalid.

> Now, that doesn't mean we have to just ignore your report. But it
> means that it will be lower priority, and we can either:
>  (a) raise a runtime error,

This isn't required by the Fortran 95 standard.

>  (b) print a runtime warning and do it nonetheless (it works on some 
>  systems),
>  (c) document that it might work or not depending on the system,

For the current situation, this is the best option,

>  (d) find why it doesn't work, evaluate whether we can make it work
> in the general case, make it work and document it as an extension
> 
> You're asking for (d), if I understand correctly. You'll have to admit
> that it's probably the most difficult of all the options :)

Yes, it is.

> >From my limited understanding of fortran above f90 and from what I have
> >read on different lists, if
> >
> >tmp=fun(...)
> >print *, tmp
> >
> >does not give the same result as
> >
> >print *, fun(...)
> >
> >the function fun(...) is almost certainly not standard conforming
> >(I someone has an example proving this is false, I'll be very glad to
> >study it!-).

For Fortran 95, there is no "almost".  Go read comment #2 of PR30617.
The code in that PR is clearly invalid with respec to Fortran 95.
gfortran is not required to issue a error or a warning.  It can do
anything it wants.  Comment #2 also notes that the code is valid
Fortran 2003, so the PR should be changed to an enhancement request.

-- 
Steve


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