This is the mail archive of the
mailing list for the GCC project.
Re: Proposed g77 patch
- To: "G. Helffrich" <george at geo dot titech dot ac dot jp>
- Subject: Re: Proposed g77 patch
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 24 Jul 2001 13:45:19 +0200
- CC: gcc-patches at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200107240704.QAA05123@xterm1.geo.titech.ac.jp>
"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
> 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):
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
http://gcc.gnu.org/contribute.html). [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.
Toon Moene - mailto:email@example.com - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)