This is the mail archive of the 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: Proposed g77 patch

"G. Helffrich" wrote:

>      Below is a proposed fix to relax subscript range checking behavior in g77
> when -fbounds-check is in effect.  See comments in test program and subsequent
> patch.

> C     Substring range checking test program, to check behavior with respect
> C     to X3J3/90.4 paragraph 5.7.1.

Yep, I believe the behaviour you want is conformant with the following
quote from the Fortran 95 Standard (October '97 draft):

6.1.1 Substrings

Let the characters in the parent string be numbered 1,2,3,..,n, where n
is the length of the parent string.  Then the characters in the
substring are those from the parent string from the starting point and
proceeding in sequence up to and including the ending point.  Both the
starting point and the ending point shall be within the range 1,2,3,..,n
unless the starting point exceeds the ending point, in which case the
substring has length zero.

I think your patch is OK (I didn't actually try it out yet).  However,
such a large patch (+ test case) makes it necessary for you to have an
assignment on file for your code to the FSF (see  [Last year's patch was small
enough to be acceptable without an assignment].

Please follow the steps in that page to get your contribution accepted.

Thanks !

Toon Moene - - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77:
Join GNU Fortran 95: (under construction)

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