This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: array bounds checking?
- To: egcs at cygnus dot com
- Subject: Re: array bounds checking?
- From: Dave Love <d dot love at dl dot ac dot uk>
- Date: 23 May 1998 00:25:42 +0100
- References: <11492.895806192@hurl.cygnus.com>
>>>>> "Jeff" == Jeffrey A Law <law@hurl.cygnus.com> writes:
Jeff> It might be interesting to hear from the Fortran folks if they
Jeff> have any opinions.
[I think Craig is busy at the moment.]
I haven't looked at this closely, but I don't think it's really
relevant to Fortran. With its proper multidimensional arrays the
problem seems quite simple (modulo possible tricks to reduce the
overhead which we wouldn't expect).
To do the runtime bounds checking we want is probably only an hour or
two's work on the front end for someone sufficiently expert on tree
code; Toon and I aren't and we haven't hassled Craig over it. I think
there are three places in f/com.c where one needs to generate a loop
over the array indices and define/invoke a suitable runtime error when
appropriate. (AFAIR the relevant middle-end code seemed to get the
information so it could be done there instead.)
The situation in a future with fortran90-style arrays and `pointers'
might be significantly different in that respect, but I guess not.