[gfortran, PR33254] Add -fbounds-checking for character array constructors

Tobias Burnus burnus@net-b.de
Sat Oct 13 18:05:00 GMT 2007


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



More information about the Fortran mailing list