[patch, libfortran] Fix PR 35960, zero-sized reshape
Thomas Koenig
tkoenig@netcologne.de
Sun Apr 20 20:05:00 GMT 2008
Hello world,
the following patch is a straightforward fix for when the SHAPE argument
is zero for the reshape intrinsic. The test case is the reporter's.
Regression-tested on i686-pc-linux-gnu.
OK for trunk?
Thomas
2008-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/35960
* intrinsics/reshape_generic.c (reshape_internal): If the size
of the resized array is zero, as determined by the SHAPE
argument, return early.
* m4/reshape.m4: Likewise.
* generated/reshape_i4.c: Regererated.
* generated/reshape_i8.c: Regenerated.
* generated/reshape_i16.c: Regenerated.
* generated/reshape_r4.c: Regenerated.
* generated/reshape_r8.c: Regenerated.
* generated/reshape_r10.c: Regenerated.
* generated/reshape_r16.c: Regenerated.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_c10.c: Regenerated.
* generated/reshape_c16.c: Regenerated.
2008-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/35960
* gfortran.dg/reshape_zerosize_1.f90: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape-zero.diff
Type: text/x-patch
Size: 3735 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080420/6fd04fd9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_zerosize_1.f90
Type: text/x-fortran
Size: 959 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080420/6fd04fd9/attachment-0001.bin>
More information about the Fortran
mailing list