Procedure Pointers: a first patch

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun May 11 10:35:00 GMT 2008


Janus,

The attached is a basis on which to work.  I got there by comparison
with procedure actual arguments.  It works with subroutines and scalar
functions.  It dies with pointer valued functions and I have not tried
arrays.  I suspect that the latter two will need all sorts of
dereferencing etc. etc.

You should note that there is a lot to do - checking of rvalues in the
assignment, all the clever stuff to extend to arrays etc., checking
that the procedure pointer declaration is complete, addition of
procedure pointer components (you will need to add a gfc_symbol *
field to gfc_component for the function declaration, I think - ie.
feed that to generate the declaration and point to its backend_decl
from the component backend_decl), testcases and documentation.
However, I am content that you should be able to finish the job this
summer.

Good luck and if I can be of further help, do not fail to get in touch.

All the best

Paul

BTW I have not regtested.....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: procptr0511.diff
Type: text/x-patch
Size: 11546 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080511/a7d77967/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: procptr.f90
Type: application/octet-stream
Size: 1040 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080511/a7d77967/attachment.obj>


More information about the Fortran mailing list