From e33e218badc5501c9061b30ec5314649ecaeeb62 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Wed, 4 May 2005 21:38:23 +0000 Subject: re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 Thomas Koenig PR libfortran/21354 * m4/cshift1.m4: Change dimension of auxiliary arrays from GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION. * m4/eoshift1.m4: Likewise. * m4/eoshift3.m4: Likewise. * m4/ifunction.m4: Likewise. * m4/in_pack.m4: Likewise. * m4/in_unpack.m4: Likewise. * intrinsics/cshift0.c: Likewise. * intrinsics/eoshift0.c: Likewise. * intrinsics/eoshift2.c: Likewise. * intrinsics/random.c: Likewise. * intrinsics/spread_generic.c: Likewise. * intrinsics/stat.c: Likewise. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/eoshift1_4.c: Regenerated. * generated/eoshift1_8.c: Regenerated. * generated/eoshift3_4.c: Regenerated. * generated/eoshift3_8.c: Regenerated. * generated/in_pack_i4.c: Regenerated. * generated/in_pack_i8.c: Regenerated. * generated/in_unpack_i4.c: Regenerated. * generated/in_unpack_i8.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2005-05-04 Thomas Koenig PR libfortran/21354 gfortran.dg/in_pack_rank7.f90: New test. From-SVN: r99232 --- libgfortran/intrinsics/cshift0.c | 8 ++++---- libgfortran/intrinsics/eoshift0.c | 8 ++++---- libgfortran/intrinsics/eoshift2.c | 10 +++++----- libgfortran/intrinsics/random.c | 24 ++++++++++++------------ libgfortran/intrinsics/spread_generic.c | 8 ++++---- libgfortran/intrinsics/stat.c | 8 ++++---- 6 files changed, 33 insertions(+), 33 deletions(-) (limited to 'libgfortran/intrinsics') diff --git a/libgfortran/intrinsics/cshift0.c b/libgfortran/intrinsics/cshift0.c index 2dd6a02..61fd901 100644 --- a/libgfortran/intrinsics/cshift0.c +++ b/libgfortran/intrinsics/cshift0.c @@ -81,19 +81,19 @@ cshift0 (gfc_array_char * ret, const gfc_array_char * array, ssize_t shift, int which) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/intrinsics/eoshift0.c b/libgfortran/intrinsics/eoshift0.c index 26874e1..5db3737 100644 --- a/libgfortran/intrinsics/eoshift0.c +++ b/libgfortran/intrinsics/eoshift0.c @@ -45,20 +45,20 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array, int shift, const char * pbound, int which) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/intrinsics/eoshift2.c b/libgfortran/intrinsics/eoshift2.c index 30bb3dd..8d22dbe 100644 --- a/libgfortran/intrinsics/eoshift2.c +++ b/libgfortran/intrinsics/eoshift2.c @@ -45,24 +45,24 @@ eoshift2 (gfc_array_char *ret, const gfc_array_char *array, int shift, const gfc_array_char *bound, int which) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* b.* indicates the bound array. */ - index_type bstride[GFC_MAX_DIMENSIONS - 1]; + index_type bstride[GFC_MAX_DIMENSIONS]; index_type bstride0; const char *bptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c index fdb99cc..7607bb1 100644 --- a/libgfortran/intrinsics/random.c +++ b/libgfortran/intrinsics/random.c @@ -253,9 +253,9 @@ iexport(random_r8); void arandom_r4 (gfc_array_r4 * harv) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; GFC_REAL_4 *dest; @@ -326,9 +326,9 @@ arandom_r4 (gfc_array_r4 * harv) void arandom_r8 (gfc_array_r8 * harv) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; GFC_REAL_8 *dest; @@ -498,9 +498,9 @@ iexport(random_r8); void arandom_r4 (gfc_array_r4 *x) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; GFC_REAL_4 *dest; @@ -562,9 +562,9 @@ arandom_r4 (gfc_array_r4 *x) void arandom_r8 (gfc_array_r8 *x) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; GFC_REAL_8 *dest; diff --git a/libgfortran/intrinsics/spread_generic.c b/libgfortran/intrinsics/spread_generic.c index 7dcabf6..8d39d30 100644 --- a/libgfortran/intrinsics/spread_generic.c +++ b/libgfortran/intrinsics/spread_generic.c @@ -43,7 +43,7 @@ spread (gfc_array_char *ret, const gfc_array_char *source, const index_type *along, const index_type *pncopies) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type rdelta; index_type rrank; @@ -51,13 +51,13 @@ spread (gfc_array_char *ret, const gfc_array_char *source, char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type srank; const char *sptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type n; index_type dim; index_type size; diff --git a/libgfortran/intrinsics/stat.c b/libgfortran/intrinsics/stat.c index d7ed761..df76f3f 100644 --- a/libgfortran/intrinsics/stat.c +++ b/libgfortran/intrinsics/stat.c @@ -73,7 +73,7 @@ stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status, char *str; struct stat sb; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type stride[GFC_MAX_DIMENSIONS]; /* If the rank of the array is not 1, abort. */ if (GFC_DESCRIPTOR_RANK (sarray) != 1) @@ -168,7 +168,7 @@ stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status, char *str; struct stat sb; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type stride[GFC_MAX_DIMENSIONS]; /* If the rank of the array is not 1, abort. */ if (GFC_DESCRIPTOR_RANK (sarray) != 1) @@ -293,7 +293,7 @@ fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status) int val; struct stat sb; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type stride[GFC_MAX_DIMENSIONS]; /* If the rank of the array is not 1, abort. */ if (GFC_DESCRIPTOR_RANK (sarray) != 1) @@ -379,7 +379,7 @@ fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status) int val; struct stat sb; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type stride[GFC_MAX_DIMENSIONS]; /* If the rank of the array is not 1, abort. */ if (GFC_DESCRIPTOR_RANK (sarray) != 1) -- cgit v1.1