(j3.2006) does move_alloc violate restrictions in 12.5.2.13?

Robert Corbett Robert.Corbett
Fri Oct 30 02:28:04 EDT 2009


Robert Corbett wrote:
> Van Snyder wrote:
> 
>> Is this subroutine standard conforming?
>>
>> subroutine Move_Alloc ( A, B )
>>  real, intent(inout), allocatable :: A
>>  real, intent(out), allocatable :: B
>>  allocate ( b )
>>  b = a
>>  deallocate ( a )
>> end subroutine Move_Alloc
>>
>> Now, how about if I call it
>>  call move_alloc ( x, x )
>>
>> The call is a problem, not the subroutine.
>>
>> There's no problem with the standard's description of the intrinsic 
>> subroutine Move_Alloc.
> 
> 
> I am beginning to think there is a problem with the standard's
> description of MOVE_ALLOC.

I just read Kurt Hirchert's e-mail, and I agree that item (1) on
page 300 does prohibit the call

       CALL MOVE_ALLOC(X, X)

Bob Corbett



More information about the J3 mailing list