This is the mail archive of the mailing list for the GCC 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]

[PATCH, Fortran] Correct Cray pointer documentation in gfortran.texi

:ADDPATCH fortran:

The description of Cray pointers in gfortran.texi erroneously claims that there is no MALLOC intrinsic, presumably because there wasn't one when that piece of the documentation was written. The attached patch corrects this, removing the now-obsolete example of a C workaround.

Note that this patch must be applied after my previous patch regarding -fno-range-check, which Steve Kargl has approved but not yet applied. (This one, of course, will also need to be applied by the approver, as I don't have write access.)

Changelog entry:

2006/09/30  Brooks Moses  <>

	* gfortran.texi: Corrected references to MALLOC intrinsic.

- Brooks
Index: gfortran.texi
--- gfortran.texi	(revision 117334)
+++ gfortran.texi	(working copy)
@@ -1074,30 +1081,9 @@
         ipt = loc(ar)  ! Makes arpte is an alias for ar
         arpte(1) = 1.0 ! Sets ar(1) to 1.0
 @end smallexample
-The pointer can also be set by a call to a malloc-type
-function.  There is no malloc intrinsic implemented as part of the
-Cray pointer extension, but it might be a useful future addition to
-@command{gfortran}.  Even without an intrinsic malloc function,
-dynamic memory allocation can be combined with Cray pointers by
-calling a short C function:
+The pointer can also be set by a call to the @code{MALLOC} intrinsic
+(see @ref{MALLOC}).
-        void mymalloc_(void **ptr, int *nbytes)
-        @{
-            *ptr = malloc(*nbytes);
-            return;
-        @}
-        program caller
-        integer ipinfo;
-        real*4 data
-        pointer (ipdata, data(1024))
-        call mymalloc(ipdata,4*1024)
-        end
-@end smallexample
 Cray pointees often are used to alias an existing variable.  For

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