From e94471bae06f30fae4904fa95da2d36a9dc11985 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Fri, 25 Apr 2008 20:11:19 +0000 Subject: [PATCH] re PR fortran/35960 (run time abort with assignment of RESHAPEd zero sized array) 2008-04-25 Thomas Koenig 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 --- libgfortran/ChangeLog | 16 ++++++++++++++++ libgfortran/generated/reshape_c10.c | 2 +- libgfortran/generated/reshape_c16.c | 2 +- libgfortran/generated/reshape_c4.c | 2 +- libgfortran/generated/reshape_c8.c | 2 +- libgfortran/generated/reshape_i16.c | 2 +- libgfortran/generated/reshape_i4.c | 10 +++++----- libgfortran/generated/reshape_i8.c | 2 +- libgfortran/generated/reshape_r10.c | 2 +- libgfortran/generated/reshape_r16.c | 2 +- libgfortran/generated/reshape_r4.c | 2 +- libgfortran/generated/reshape_r8.c | 2 +- libgfortran/m4/reshape.m4 | 2 +- 13 files changed, 32 insertions(+), 16 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 9747c0e480d..df959f93544 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,19 @@ +2008-04-25 Thomas Koenig + + 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 * intrinsics/time_1.h (__time_1): Remove unused variable. diff --git a/libgfortran/generated/reshape_c10.c b/libgfortran/generated/reshape_c10.c index 28cad4a0b6e..732d947a8da 100644 --- a/libgfortran/generated/reshape_c10.c +++ b/libgfortran/generated/reshape_c10.c @@ -131,7 +131,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_c16.c b/libgfortran/generated/reshape_c16.c index ce658dae668..71532c929ef 100644 --- a/libgfortran/generated/reshape_c16.c +++ b/libgfortran/generated/reshape_c16.c @@ -131,7 +131,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c index fd33a954a06..4253b066815 100644 --- a/libgfortran/generated/reshape_c4.c +++ b/libgfortran/generated/reshape_c4.c @@ -131,7 +131,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c index d23cf88c0a3..add90f2f205 100644 --- a/libgfortran/generated/reshape_c8.c +++ b/libgfortran/generated/reshape_c8.c @@ -131,7 +131,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_i16.c b/libgfortran/generated/reshape_i16.c index c9b3694c5de..e2d5a275842 100644 --- a/libgfortran/generated/reshape_i16.c +++ b/libgfortran/generated/reshape_i16.c @@ -131,7 +131,7 @@ reshape_16 (gfc_array_i16 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c index 4a55b68fed6..3e0c9d68542 100644 --- a/libgfortran/generated/reshape_i4.c +++ b/libgfortran/generated/reshape_i4.c @@ -94,10 +94,10 @@ reshape_4 (gfc_array_i4 * const restrict ret, { shape_data[n] = shape->data[n * shape->dim[0].stride]; if (shape_data[n] <= 0) - { - shape_data[n] = 0; - shape_empty = 1; - } + { + shape_data[n] = 0; + shape_empty = 1; + } } if (ret->data == NULL) @@ -131,7 +131,7 @@ reshape_4 (gfc_array_i4 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c index d496ca9d7ef..bf3185e1c2c 100644 --- a/libgfortran/generated/reshape_i8.c +++ b/libgfortran/generated/reshape_i8.c @@ -131,7 +131,7 @@ reshape_8 (gfc_array_i8 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_r10.c b/libgfortran/generated/reshape_r10.c index 61e367c96ce..9f6159aeafb 100644 --- a/libgfortran/generated/reshape_r10.c +++ b/libgfortran/generated/reshape_r10.c @@ -131,7 +131,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_r16.c b/libgfortran/generated/reshape_r16.c index f04fe32c6a8..69578f033a5 100644 --- a/libgfortran/generated/reshape_r16.c +++ b/libgfortran/generated/reshape_r16.c @@ -131,7 +131,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_r4.c b/libgfortran/generated/reshape_r4.c index 0323a724624..112dbf2955d 100644 --- a/libgfortran/generated/reshape_r4.c +++ b/libgfortran/generated/reshape_r4.c @@ -131,7 +131,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/generated/reshape_r8.c b/libgfortran/generated/reshape_r8.c index e6be1ef03be..015546ffe1a 100644 --- a/libgfortran/generated/reshape_r8.c +++ b/libgfortran/generated/reshape_r8.c @@ -131,7 +131,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4 index ed060ecb9ff..a10ad715584 100644 --- a/libgfortran/m4/reshape.m4 +++ b/libgfortran/m4/reshape.m4 @@ -135,7 +135,7 @@ reshape_'rtype_ccode` ('rtype` * const restrict ret, rstride[n] = ret->dim[dim].stride; rextent[n] = ret->dim[dim].ubound + 1 - ret->dim[dim].lbound; if (rextent[n] < 0) - rextent[n] == 0; + rextent[n] = 0; if (rextent[n] != shape_data[dim]) runtime_error ("shape and target do not conform"); -- 2.30.2