This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, fortran] PR37735 - Allocatable components in vectors of derived types cause ICE on assignment
On Mon, Nov 24, 2008 at 10:45:51PM +0100, Toon Moene wrote:
> Thomas Koenig wrote:
> >Maybe we could also focus a bit on bounds checking. There are numerous
> >things we don't check at the moment (array intrinsics and also other
> >cases), and I'd like some improvement there :-)
> One option that would help me (and probably countless others) to debug
> legacy code is an -fcheck-size option.
> The meaning of this option would be:
> Check if array references fall within the extent of the array.
> REAL A(10,10)
> A = 1.0
> CALL SUB(A,10)
> SUBROUTINE SUB(A, N)
> REAL A(N, N)
troutmask:kargl gfc -fbounds-check t.f90
At line 8 of file t.f90
Fortran runtime error: Array reference out of bounds for array 'a', upper bound of dimension 2 exceeded (100 > 10)