(j3.2006) Did we intend to prohibit this?
Van Snyder
van.snyder
Mon Mar 13 23:58:31 EDT 2017
On Tue, 2017-03-14 at 10:07 +0900, Cohen Malcolm wrote:
>
> > then the result variable of F(X) in
> >
> > call move_alloc ( f(x), v )
> >
> >IS a variable, right? So what's the problem with executing it?
>
> That is not standard-conforming because
> (1) "f(x)" is not even a variable, let alone definable;
> (2) "f(x)" does not have the ALLOCATABLE attribute.
Then how is it possible to deallocate it?
> As explained earlier, MOVE_ALLOC requires both arguments to be
> definable variables, by virtue of the INTENT specification.
Is it really necessary for it to be this way? Is there a technical
problem with
call move_alloc ( f(x), v )
instead of
v = f(x)
It seems desirable to avoid deallocating v, reallocating it to the same
shape as f(x), copying the value, and deallocating the result of f(x).
More information about the J3
mailing list