(j3.2006) (SC22WG5.3591) Assumed-type and Assumed-rank extensions for C Interop TR.

Bill Long longb
Fri Jul 25 14:38:50 EDT 2008

Jim Xia wrote:
> j3-bounces at j3-fortran.org wrote on 07/25/2008 02:19:22 PM:
> > Aleks did say "like doing".  Modifying the rules for pointer assignment
> > is not in the paper.  Variables of type(*) are not allowed in that
> > context. We already have the c_f_pointer option, and I was intentional
> > in trying to minimize the impact on other parts of the standard in the
> > TR.  If we wanted to add the pointer assignment rule changes in a 
> future
> > standard revision, the would be possible.  But it's not necessary to 
> get
> > the needed functionality. (Unless I missed something, which is 
> possible.)
> The basic problem is Fortran side can not use this type directly.  If 
> the procedure is defined in Fortran for C, then how can a Fortran 
> programmer "map" this dummy argument to real Fortran data type. 

In what way does C_F_POINTER fail to solve this problem?  It was 
explicitly designed to be used on the Fortran side to give a Fortran 
type, type parameters, and shape to a block of memory pointed to by a C 


>  This is similar to CLASS(*) case, in which we have select type 
> construct, or data pointer assignment to deal with that situation.  It 
> seems to me TYPE(*) needs to be allowed in data pointer assignment as 
> the target in order to achieve this purpose.
> Cheers,
> Jim Xia
> RL 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

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