This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Add malloc and free intrinsics


François-Xavier Coudert wrote:
I updated the documentation so that it mentions that Cray pointers are
not yet supported, so that the example is not working yet; it says
that the example is for 32-bit systems, and indicates that MALLOC/FREE
are here to support legacy code, and hints that the Fortran 95
intrinsics to do memory allocation are ALLOCATE/DEALLOCATE.

I changed the testsuite file so that it uses integer*8, that works on
both 32- and 64-bit systems.

Any more comments?
[...]
+@table @asis
+@item @emph{Description}:
+Frees memory previously allocated by @code{MALLOC()}. The @code{FREE}
+intrinsic is an extension intended to be used with Cray pointers, and is
+provided in @command{gfortran} to allow user to compile legacy code. For
+new code using Fortran 95 pointers, the memory de-allocation intrinsic is
+@code{DEALLOCATE}.

The documentation all looks quite good to me, except that I would take out the "new" in "For new code...." here (and in the corresponding paragraph of MALLOC) -- DEALLOCATE is also the memory de-allocation intrinsic for old code using Fortran 95 pointers. :)


Also, that should be "allow the user" or "allow users", not "allow user", here and in MALLOC.

- Brooks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]