This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran, PR33254] Add -fbounds-checking for character array constructors
- From: Tobias Burnus <burnus at net-b dot de>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 13 Oct 2007 20:05:30 +0200
- Subject: Re: [gfortran, PR33254] Add -fbounds-checking for character array constructors
- References: <470CE887.2040002@physik.uni-muenchen.de>
Tobias Schlüter wrote:
> the patch is straightforward, and does exactly what is advertised in
> the subject line. Unfortunately, I discovered PR33727 while preparing
> this patch. One PR down, still the same number to go.
Reviewing had been faster, if you used ADDPATCH ...
(And, since I started ranting, it would be great if FX were using the PR
number in the subject or at least in the message body; currently I have
to save his patches (MIME application/octet-stream) to find out whether
there is a PR.)
> Built and tested on i386-darwin. Ok?
I think the patch is ok, however: The bounds check is done
unconditionally whereas the subject implies that it is only done with
-fbounds-check.
(I'm slightly inclined to prefer to have the check with -fbounds-check
only, but I am also satisfied with an unconditional error.)
Other compilers:
a) NAG f95 and g95 always give a run-time error
b) ifort, sunf95, openf95 give no error (not even with bounds checking
enabled)
Current gfortran does (b), with the patch it does (a)
Tobias