(j3.2006) paper 13-228

Van Snyder Van.Snyder
Tue Feb 5 19:48:48 EST 2013


On Tue, 2013-02-05 at 18:20 -0600, Bill Long wrote:
> 
> On 2/5/13 5:12 PM, Robert Corbett wrote:
> > While I know we are supposed to read all the papers before the meeting, I want
> > to draw special attention to paper 13-228.  I see no good solutions to the issue
> > discussed in the paper.  One seemingly small extension has caused a remarkable
> > number of problems.
> 
> Understatement!
> 
> I'm not convinced the first alternate edit is correct.  If the dummy 
> argument associated with the pointer function reference is never 
> referenced in the procedure, the procedure appears to be still 
> conforming.  Or if the procedure has only one argument and no other 
> access to data outside the procedure (no USE or COMMON or host 
> association) then the target of the corresponding actual argument 
> pointer could be modified by the procedure and still have a conforming 
> procedure.

The program doesn't conform because the subroutine reference has two
dummy arguments that are associated with the same variable.  It has for
a long time (since F77?) been illegal to change the value of an argument
by way of another argument.

> I find the prospect of having programs that were perfectly legal in 
> F2003 suddenly breaking to be disconcerting.   It is also disturbing to 
> make codes that are legal now with F2008 suddenly no longer legal.   As 
> Bob says, "no good solutions".

Three of the four compilers I tried have the "bug" of interpreting fx()
to be a variable, not an expression.

All of them interpret (fx()) to be an expression, not a variable.

> I suppose the lesson is to treat "seemingly small extension" proposals 
> with a healthy dose of skepticism.

Since it was apparently a common "bug" to interpret fx() as a variable,
perhaps it was wrong all along for the standard to insist that it was
not one.  It did, after all, require extra work, both for the compiler
developer and the program at run time, to take a copy of its target.

Since most compilers appear to have conformed to Fortran 2008, in this
regard, since 1995, I prefer the alternative edits.

> Cheers,
> Bill
> 
> 
> 
> >
> > Robert Corbett
> > _______________________________________________
> > J3 mailing list
> > J3 at mailman.j3-fortran.org
> > http://mailman.j3-fortran.org/mailman/listinfo/j3
> >
> 





More information about the J3 mailing list