re PR libfortran/34980 (Segfault in shape given a scalar)

2008-01-27  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34980
	* m4/shape.m4:  If return array is empty, return early.
	* generated/shape_i4.c:  Regenerated.
	* generated/shape_i8.c:  Regenerated.
	* generated/shape_i16.c:  Regenerated.

From-SVN: r131915
This commit is contained in:
Thomas Koenig 2008-01-28 19:02:47 +00:00
parent 2aa42e6e3b
commit bc81405676
5 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2008-01-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34980
* m4/shape.m4: If return array is empty, return early.
* generated/shape_i4.c: Regenerated.
* generated/shape_i8.c: Regenerated.
* generated/shape_i16.c: Regenerated.
2008-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfofortran/34887

View File

@ -48,6 +48,9 @@ shape_16 (gfc_array_i16 * const restrict ret,
stride = ret->dim[0].stride;
if (ret->dim[0].ubound < ret->dim[0].lbound)
return;
for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)
{
ret->data[n * stride] =

View File

@ -48,6 +48,9 @@ shape_4 (gfc_array_i4 * const restrict ret,
stride = ret->dim[0].stride;
if (ret->dim[0].ubound < ret->dim[0].lbound)
return;
for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)
{
ret->data[n * stride] =

View File

@ -48,6 +48,9 @@ shape_8 (gfc_array_i8 * const restrict ret,
stride = ret->dim[0].stride;
if (ret->dim[0].ubound < ret->dim[0].lbound)
return;
for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)
{
ret->data[n * stride] =

View File

@ -49,6 +49,9 @@ shape_'rtype_kind` ('rtype` * const restrict ret,
stride = ret->dim[0].stride;
if (ret->dim[0].ubound < ret->dim[0].lbound)
return;
for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)
{
ret->data[n * stride] =