[Patch, fortran] PR25097 - Component of optional argument allowed as arg. to PRESENT

Paul Thomas paulthomas2@wanadoo.fr
Tue Jul 11 16:09:00 GMT 2006


:ADDPATCH fortran:

13.14.82  PRESENT(A)
......
Argument.  A shall be the name of an optional dummy argument that is 
accessible in the subprogram in which the PRESENT function reference 
appears......

At present, gfortran allows subobjects of A to be the actual argument of 
PRESENT.  The patch applies the requirement in check.c(check_present).  
It is straightforward, as is the test case.

Regtested on FC5/Athlon.  OK for trunk and 4.1?

Paul

2006-07-11  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/25097
    * check.c (check_present): The only permitted reference is a
    full array reference.

2006-07-11  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/25097
    * gfortran.dg/present_1.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25097.diff
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060711/bc0300a3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: present_1.f90
Type: text/x-fortran
Size: 531 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060711/bc0300a3/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060711/bc0300a3/attachment.ksh>


More information about the Gcc-patches mailing list