This is the mail archive of the gcc@gcc.gnu.org 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]

Re: array bounds checking?


>>>>> "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.


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