(j3.2006) does move_alloc violate restrictions in

Bill Long longb
Wed Oct 28 13:57:13 EDT 2009

Jim Xia wrote:
>  > I am sure some problem happens in the internals of the IBM compiler but
>  > this does not appear to be a problem of the standard. The intrinsics
>  > follow special rules.
> Are intrinsics exempt from the general rules of the standard?  The 
> question I raised here is not about one particular implementation, it is 
> about if the standard is consistent in what rules should follow.  I 
> think there hasn't been any convincing argument that my view is false. 
>  That is, an allocatable variable has to be associated with both FROM 
> and TO at some point during the execution of the MOVE_ALLOC.  Is this 
> allowed by rules in

The rules in (and elsewhere in the standard) are for 
procedures written in Fortran. Most of the intrinsics, and especially 
ones like MOVE_ALLOC, are most likely not written in Fortran. 
MOVE_ALLOC is probably either inline code, or a C library routine, that 
plays games with the internals of the respective dope vectors for the 
arguments. It was created because you can't do these sorts of things in 
Fortran.  I assume this was the origin of Aleks' 'special rules' comment.

The specific rule in, number (2), only talks about references 
to the associated actual argument through the dummy argument or its 
values being affected.  Even if there were dummy arguments in the 
Fortran sense, these restrictions would not seem to apply to MOVE_ALLOC. 
  The allocatable arguments themselves are not referenced or defined - 
the operations are on the dope vectors.


> Cheers,
> Jim Xia
> XL Fortran Compiler Test
> IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
> Phone (905) 413-3444  Tie-line 313-3444
> email: jimxia at ca.ibm.com
> D2/YF7/8200 /MKM
> http://www.ibm.com/software/awdtools/fortran/xlfortran

Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

More information about the J3 mailing list