[Patch, fortran] PR32315 - DATA with implied-do: Bounds checks missing [regression vs. g77]

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Feb 5 09:47:00 GMT 2008


:ADDPATCH fortran:

Here is what is getting to be a very rare beast - a regression with
respect to g77.  Adding the requisite bounds checking was very
straightforward, as will be seen from the patch.  Note that the
arrayspec from the gfc_ref is used, rather than the symbol's
array_spec - I got caught with this.  To see why, take a look at
gfortran.fortran-torture/compile/data.f90.

Regtested on Cygwin_NT/amd64 - OK for trunk after a spin on x86_ia64/FC8?

Cheers

Paul

2008-02-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32315
	* data.c (gfc_assign_data_value): Add bounds check for array
	references.

2008-02-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32315
	* gfortran.dg/data_bounds_1.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 2044 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080205/1fada71b/attachment.bin>


More information about the Fortran mailing list