(j3.2006) a question on c_f_pointer call
Jim Xia
jimxia
Fri Aug 27 12:49:48 EDT 2010
> "eligible for deallocation". How you can do this without any
> calculations at pointer assignments or procedure calls is beyond me.
Aleks, this is an interesting statement. I'm not sure how many vendors
are doing the "calculations" at the procedure call to determine whether a
pointer is eligible for deallocation. Certainly XLF is not doing it. I
can see Cray is not doing it either. Based on the behaviors of several
compilers reported by Bill, I'm guessing none of them doing it. A
compiler may blindly do a free on a piece of memory to see if it works --
that seems to be what gfortran is doing. So this "calculation" business
is certainly missing from many compilers.
Even you do a calculation at a procedure call, can you imagine how to do
this for C_F_POINTER call? I have no idea how this can be done reliably
given CPTR only carries a plain C address, no other information.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20100827/dc55dc66/attachment.htm>
More information about the J3
mailing list