This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [gfortran, testsuite] Fix bounds checking for substrings, enable bounds chekcing in dg testsuite, assorted fixes


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


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