re PR fortran/35960 (run time abort with assignment of RESHAPEd zero sized array)

2008-04-25  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/35960
	* m4/reshape.m4:  Fix typo in last commit.
	* 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.

From-SVN: r134677
This commit is contained in:
Thomas Koenig 2008-04-25 20:11:19 +00:00
parent e55d0e3595
commit e94471bae0
13 changed files with 32 additions and 16 deletions

View File

@ -1,3 +1,19 @@
2008-04-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/35960
* m4/reshape.m4: Fix typo in last commit.
* 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-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2008-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* intrinsics/time_1.h (__time_1): Remove unused variable. * intrinsics/time_1.h (__time_1): Remove unused variable.

View File

@ -131,7 +131,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -94,10 +94,10 @@ reshape_4 (gfc_array_i4 * const restrict ret,
{ {
shape_data[n] = shape->data[n * shape->dim[0].stride]; shape_data[n] = shape->data[n * shape->dim[0].stride];
if (shape_data[n] <= 0) if (shape_data[n] <= 0)
{ {
shape_data[n] = 0; shape_data[n] = 0;
shape_empty = 1; shape_empty = 1;
} }
} }
if (ret->data == NULL) if (ret->data == NULL)
@ -131,7 +131,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -131,7 +131,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");

View File

@ -135,7 +135,7 @@ reshape_'rtype_ccode` ('rtype` * const restrict ret,
rstride[n] = ret->dim[dim].stride; rstride[n] = ret->dim[dim].stride;
rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound;
if (rextent[n] < 0) if (rextent[n] < 0)
rextent[n] == 0; rextent[n] = 0;
if (rextent[n] != shape_data[dim]) if (rextent[n] != shape_data[dim])
runtime_error ("shape and target do not conform"); runtime_error ("shape and target do not conform");