[Patch, fortran] PR29758 - Runtime segfault in RESHAPE with insufficient elements in SOURCE
Paul Thomas
paulthomas2@wanadoo.fr
Thu Nov 9 02:44:00 GMT 2006
:ADDPATCH fortran:
This patch checks to see if there are enough elements in reshape's
source to match shape, when shape is a constant array and source has a
constant shape. It is a self explanatory bit of hacking in check.c.
The testcase checks two obvious errors and checks that a correct one
goes through.
Regtested Suse10.1/amd64.
OK for trunk, 4.2 and 4.1?
Paul
2006-11-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29758
* check.c (gfc_check_reshape): Check that there are enough
elements in the source array as to be able to fill an array
defined by shape, when pad is absent.
2006-11-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29758
* gfortran.dg/reshape_source_size_1.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr29758.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061109/56321559/attachment.ksh>
More information about the Fortran
mailing list