(j3.2006) COPY mode of argument association
Bill Long
longb
Thu Dec 17 16:32:13 EST 2015
On Dec 17, 2015, at 3:07 PM, Lionel, Steve <steve.lionel at intel.com> wrote:
>
> "The solution was to pass the location of the child vertex back as a
> function argument. I hope processors don't calculate the address of the
> function result and pass that as a hidden argument for the function to use
> to store its result value."
>
> Why, yes, they do. On the implementations I am familiar with, this happens
> if the result is of a type other than what the ABI says should be returned
And probably also on implementations that Steve might not be familiar with. There is not really a practical alternative.
> in registers. For example, returning any array or CHARACTER value would be
> done with a hidden argument containing an address of temporary storage
> computed by the caller.
Handy having the temp storage created by the caller, since that is the scope where the result variable will be referenced, and where the storage has to be ?cleaned up? later. Similarly for function results that are pointers or allocatable - the descriptor for the result value is owned by the caller.
>
> I didn't fully understand the problem statement, but it seemed to me that
> pointers might be an appropriate solution.
>
> Steve
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3
mailing list