f77 question/space saver
Calvin H. Vu
calvin at dinkum.sgi.com
Thu Mar 1 16:50:10 AEST 1990
In article <765 at ns-mx.uiowa.edu> knosp at umaxc.weeg.uiowa.edu (Boyd Knosp) writes:
>Why do I get this error using f77 on a 4D120GTX:
> Program x
> Implicit None
> Structure /test/
> Character*80 text
> End Structure
> Record /test/ Myvar
> Integer*4 I
> Myvar.text="(Hello)"
> I=Index(Myvar.text,")")
>
> End
>%f77 x.f
>Error on line 16 of x.f: bad argument type to intrinsic index
>Note: The same thing happens with other intrinsic functions when I
> try to pass subrecords to them. If I assign to a temp var
> and pass the temp var to the fn instead, it compiles fine...
There was a bug in the MIPS 1.31 release of the compiler regarding the
use of record elements as arguments. This has been fixed in the
MIPS 2.0 compiler which will be in our next release.
>f77 creates huge exectuables. I reduce size by linking with shared
>libs and 'strip'ing the labels out of them (once they're debugged).
>It is nice to note that the old unix dynamic memory allocation trick
>for FORTRAN works with the SGI compiler. Dynamically allocating large
>arrays also reduces f77 execuatble size. (I have the source code if
>anyone has need for dynamically allocated FORTRAN arrays)
In the next release, we will have POINTER type so you can associate
a pointer to a dynamically-allocated array. This will make dynamic
array allocation much easier to do.
>Randy Frank
>University of Iowa Image Analysis Facility
>randy at tessa.iaf.uiowa.edu
Calvin Vu
More information about the Comp.sys.sgi
mailing list