This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran, testsuite] Fix bounds checking for substrings, enable bounds chekcing in dg testsuite, assorted fixes
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Nov 2006 18:06:54 -0800
- Subject: Re: [gfortran, testsuite] Fix bounds checking for substrings, enable bounds chekcing in dg testsuite, assorted fixes
- References: <email@example.com>
On Sat, 2006-11-25 at 02:54 +0100, Tobias SchlÃter wrote:
> 3. g77/dnrm2.f is a bit special, because it uses
> the widespread syntax to imitate assumed-length arrays
> dimension a(100)
> call s(100, a)
> subroutine s(n,a)
> dimension a(1)
> do i=1,n
> a(i) = ...
> end do
> end subroutine
> Maybe our bounds checking is overzealous here?
I think this is undefined behavior even as defined by Fortran 77.
What the user mention is that the dimension on a is 1. Maybe we can
special case this case. Maybe the question is did g77 special case it?