Gfc bug: internal recursion run-time error

Paul Brook paul@codesourcery.com
Mon Jan 10 01:26:00 GMT 2005


On Sunday 09 January 2005 23:06, Steve Kargl wrote:
> On Sun, Jan 09, 2005 at 05:51:14PM -0500, Andrew Pinski wrote:
> > On Jan 9, 2005, at 5:37 PM, Mark Hadfield wrote:
> > >Hi
> > >
> > >The attached program looks like valid Fortran to me. It should print
> > >the string "aaaa". It works OK on several compilers (Compaq Visual
> > >Fortran 6.6 on Windows, Absoft Pro Fortran 8.0 on Linux, Cray CF90 on
> > >Cray T3E). On gfortran (Cygwin) it gives the following run-time error:
> >
> > Yes this is a bug, this is now PR 19352.
>
> Are you sure?  NAG's Fortran 95 compiler gives a run time error.
> kargl[207] f95 -o y y.f90
> kargl[208] ./y
> Recursive I/O reference
> Program terminated by fatal error
> Abort (core dumped)
>
> ISTR that recursion is one area that Fortran 2003 has made
> some changes to the Fortran 95 standard.  The program may
> be conforming to the newer standard, but it may not be
> conforming to the older standard (which I do not have access).

Correct.

Section 9.7 "Restriction on function references and list items" of the f95 
standard says:

"A function reference shall not appear [...] if such a reference causes 
annother input/output statement to be executed."

I've modified the PR accordingly.

Paul



More information about the Fortran mailing list