This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding:from; b=FnvT4WevhCASH5u6tsjNRw5KLwwHqRCQ09m/KLUcehyjF4XOHozuA1+oKTLcPLnLVU2rbuIWQVLRdzAXghd9W23HFa5FCWWS73uYYo0tsOtnIKe0VzurLQJ0DfyLgjYl5o/ZuMxi7wiZhOflwJ4K5s8/HWzt8va9FyTpKISdWh0=
- References: <20061125025430.8ir73wr1sswggww0@webmail.physik.uni-muenchen.de>
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?
Thanks,
Andrew Pinski