passing arguments by value
Christopher D. Rickett
crickett@lanl.gov
Wed Mar 29 17:53:00 GMT 2006
just fyi, i have added support for the value attribute of f03 to my
modified gfortran, allowing things like reals, ints, derived types, etc.
to be passed by value. i've been pretty busy lately, but i have begun the
work to get the code submitted. the work also includes the C interop
binding stuff, which has been working for some time, and procedure
declaration statements. the procedure declaration statements are working
fairly well, but they are not complete (primarily, procedure pointers are
not working). the by value and c interop stuff seems more complete, but
i can't guarantee i've got it all covered. :-)
if the paperwork gets done, perhaps i can submit things in pieces, since
proc pointers aren't working yet?
Chris
On Wed, 29 Mar 2006, Paul Thomas wrote:
> Mariano,
>
> > could somebody give some hints on how to compile a fortran code which
> > uses %VAL() to pass arguments to a subroutine??? intel fortran compiler
> > works ok, old g77 too, but it seems that brand new versions of GCC (4.xx)
> > cannot. i have been googleing around but apparently this is not an
> > urgent issue to implement (re-implement?) in gcc.
> >
> I most of the way developed a patch to do this before Christmas; a preliminary
> version is posted on http://gcc.gnu.org/ml/fortran/2005-12/msg00123.html It
> is perfectly usable, so apply it and enjoy.
>
> The patch needs finishing but it keeps falling to the bottom of the heap.
> Following Tobi's brackets patch, I can see a much cleaner way of doing it. It
> will happen, I just cannot promise when.
>
> > ok, i know the kind of answers "this is not part of the fortran
> > standard", but it has been a very useful artifact for such a long time...
> >
> ... and it anticipates passing by value in F2003.
>
> Paul
>
>
>
>
More information about the Fortran
mailing list