[Patch, libfortran] Fix PR 21354, rank 7
Thomas Koenig
Thomas.Koenig@online.de
Wed May 4 21:39:00 GMT 2005
This fixes PR 21354 (rank 7 not handled correctly). Committed to
mainline as obvious after regression-testing.
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
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 <Thomas.Koenig@online.de>
PR libfortran/21354
gfortran.dg/in_pack_rank7.f90: New test.
-------------- next part --------------
Index: m4/cshift1.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/cshift1.m4,v
retrieving revision 1.6
diff -p -r1.6 cshift1.m4
*** m4/cshift1.m4 12 Jan 2005 21:27:31 -0000 1.6
--- m4/cshift1.m4 4 May 2005 20:44:30 -0000
*************** cshift1_`'atype_kind (const gfc_array_ch
*** 46,69 ****
const atype * h, const atype_name * pwhich)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
/* h.* indicates the shift array. */
! index_type hstride[GFC_MAX_DIMENSIONS - 1];
index_type hstride0;
const atype_name *hptr;
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type dim;
index_type size;
index_type len;
--- 46,69 ----
const atype * h, const atype_name * pwhich)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
/* h.* indicates the shift array. */
! index_type hstride[GFC_MAX_DIMENSIONS];
index_type hstride0;
const atype_name *hptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: m4/eoshift1.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/eoshift1.m4,v
retrieving revision 1.6
diff -p -r1.6 eoshift1.m4
*** m4/eoshift1.m4 12 Jan 2005 21:27:31 -0000 1.6
--- m4/eoshift1.m4 4 May 2005 20:44:31 -0000
*************** eoshift1_`'atype_kind (const gfc_array_c
*** 51,74 ****
const atype_name *pwhich)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
` /* h.* indicates the shift array. */'
! index_type hstride[GFC_MAX_DIMENSIONS - 1];
index_type hstride0;
const atype_name *hptr;
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type dim;
index_type size;
index_type len;
--- 51,74 ----
const atype_name *pwhich)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
` /* h.* indicates the shift array. */'
! index_type hstride[GFC_MAX_DIMENSIONS];
index_type hstride0;
const atype_name *hptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: m4/eoshift3.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/eoshift3.m4,v
retrieving revision 1.6
diff -p -r1.6 eoshift3.m4
*** m4/eoshift3.m4 12 Jan 2005 21:27:31 -0000 1.6
--- m4/eoshift3.m4 4 May 2005 20:44:31 -0000
*************** eoshift3_`'atype_kind (gfc_array_char *r
*** 49,76 ****
atype_name *pwhich)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
` /* h.* indicates the shift array. */'
! index_type hstride[GFC_MAX_DIMENSIONS - 1];
index_type hstride0;
const atype_name *hptr;
/* b.* indicates the bound array. */
! index_type bstride[GFC_MAX_DIMENSIONS - 1];
index_type bstride0;
const char *bptr;
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type dim;
index_type size;
index_type len;
--- 49,76 ----
atype_name *pwhich)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
` /* h.* indicates the shift array. */'
! index_type hstride[GFC_MAX_DIMENSIONS];
index_type hstride0;
const atype_name *hptr;
/* b.* indicates the bound array. */
! index_type bstride[GFC_MAX_DIMENSIONS];
index_type bstride0;
const char *bptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: m4/ifunction.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/ifunction.m4,v
retrieving revision 1.10
diff -p -r1.10 ifunction.m4
*** m4/ifunction.m4 12 Apr 2005 22:57:02 -0000 1.10
--- m4/ifunction.m4 4 May 2005 20:44:32 -0000
*************** export_proto(name`'rtype_qual`_'atype_co
*** 25,34 ****
void
name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
{
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
! index_type dstride[GFC_MAX_DIMENSIONS - 1];
atype_name *base;
rtype_name *dest;
index_type rank;
--- 25,34 ----
void
name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
{
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
! index_type sstride[GFC_MAX_DIMENSIONS];
! index_type dstride[GFC_MAX_DIMENSIONS];
atype_name *base;
rtype_name *dest;
index_type rank;
*************** void
*** 160,170 ****
`m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array,
index_type *pdim, gfc_array_l4 * mask)
{
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
! index_type dstride[GFC_MAX_DIMENSIONS - 1];
! index_type mstride[GFC_MAX_DIMENSIONS - 1];
rtype_name *dest;
atype_name *base;
GFC_LOGICAL_4 *mbase;
--- 160,170 ----
`m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array,
index_type *pdim, gfc_array_l4 * mask)
{
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
! index_type sstride[GFC_MAX_DIMENSIONS];
! index_type dstride[GFC_MAX_DIMENSIONS];
! index_type mstride[GFC_MAX_DIMENSIONS];
rtype_name *dest;
atype_name *base;
GFC_LOGICAL_4 *mbase;
Index: m4/in_pack.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/in_pack.m4,v
retrieving revision 1.4
diff -p -r1.4 in_pack.m4
*** m4/in_pack.m4 12 Jan 2005 21:27:31 -0000 1.4
--- m4/in_pack.m4 4 May 2005 20:44:32 -0000
*************** dnl Only the kind (ie size) is used to n
*** 41,49 ****
rtype_name *
`internal_pack_'rtype_kind (rtype * source)
{
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
! index_type stride[GFC_MAX_DIMENSIONS - 1];
index_type stride0;
index_type dim;
index_type ssize;
--- 41,49 ----
rtype_name *
`internal_pack_'rtype_kind (rtype * source)
{
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
! index_type stride[GFC_MAX_DIMENSIONS];
index_type stride0;
index_type dim;
index_type ssize;
Index: m4/in_unpack.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/in_unpack.m4,v
retrieving revision 1.4
diff -p -r1.4 in_unpack.m4
*** m4/in_unpack.m4 12 Jan 2005 21:27:31 -0000 1.4
--- m4/in_unpack.m4 4 May 2005 20:44:32 -0000
*************** dnl Only the kind (ie size) is used to n
*** 39,47 ****
void
`internal_unpack_'rtype_kind (rtype * d, const rtype_name * src)
{
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
! index_type stride[GFC_MAX_DIMENSIONS - 1];
index_type stride0;
index_type dim;
index_type dsize;
--- 39,47 ----
void
`internal_unpack_'rtype_kind (rtype * d, const rtype_name * src)
{
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
! index_type stride[GFC_MAX_DIMENSIONS];
index_type stride0;
index_type dim;
index_type dsize;
Index: intrinsics/cshift0.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/cshift0.c,v
retrieving revision 1.10
diff -p -r1.10 cshift0.c
*** intrinsics/cshift0.c 23 Jan 2005 17:01:00 -0000 1.10
--- intrinsics/cshift0.c 4 May 2005 20:44:38 -0000
*************** cshift0 (gfc_array_char * ret, const gfc
*** 81,99 ****
ssize_t shift, int which)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
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 dim;
index_type size;
index_type len;
--- 81,99 ----
ssize_t shift, int which)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: intrinsics/eoshift0.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/eoshift0.c,v
retrieving revision 1.9
diff -p -r1.9 eoshift0.c
*** intrinsics/eoshift0.c 12 Jan 2005 21:27:30 -0000 1.9
--- intrinsics/eoshift0.c 4 May 2005 20:44:39 -0000
*************** eoshift0 (gfc_array_char * ret, const gf
*** 45,64 ****
int shift, const char * pbound, int which)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
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 dim;
index_type size;
index_type len;
--- 45,64 ----
int shift, const char * pbound, int which)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: intrinsics/eoshift2.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/eoshift2.c,v
retrieving revision 1.9
diff -p -r1.9 eoshift2.c
*** intrinsics/eoshift2.c 12 Jan 2005 21:27:30 -0000 1.9
--- intrinsics/eoshift2.c 4 May 2005 20:44:40 -0000
*************** eoshift2 (gfc_array_char *ret, const gfc
*** 45,68 ****
int shift, const gfc_array_char *bound, int which)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type roffset;
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
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 bstride0;
const char *bptr;
! index_type count[GFC_MAX_DIMENSIONS - 1];
! index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type dim;
index_type size;
index_type len;
--- 45,68 ----
int shift, const gfc_array_char *bound, int which)
{
/* r.* indicates the return array. */
! 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];
index_type sstride0;
index_type soffset;
const char *sptr;
const char *src;
/* b.* indicates the bound array. */
! index_type bstride[GFC_MAX_DIMENSIONS];
index_type bstride0;
const char *bptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type dim;
index_type size;
index_type len;
Index: intrinsics/random.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/random.c,v
retrieving revision 1.12
diff -p -r1.12 random.c
*** intrinsics/random.c 12 Jan 2005 21:27:30 -0000 1.12
--- intrinsics/random.c 4 May 2005 20:44:44 -0000
*************** iexport(random_r8);
*** 253,261 ****
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 stride0;
index_type dim;
GFC_REAL_4 *dest;
--- 253,261 ----
void
arandom_r4 (gfc_array_r4 * harv)
{
! 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;
*************** arandom_r4 (gfc_array_r4 * harv)
*** 326,334 ****
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 stride0;
index_type dim;
GFC_REAL_8 *dest;
--- 326,334 ----
void
arandom_r8 (gfc_array_r8 * harv)
{
! 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;
*************** iexport(random_r8);
*** 498,506 ****
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 stride0;
index_type dim;
GFC_REAL_4 *dest;
--- 498,506 ----
void
arandom_r4 (gfc_array_r4 *x)
{
! 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;
*************** arandom_r4 (gfc_array_r4 *x)
*** 562,570 ****
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 stride0;
index_type dim;
GFC_REAL_8 *dest;
--- 562,570 ----
void
arandom_r8 (gfc_array_r8 *x)
{
! 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;
Index: intrinsics/spread_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/spread_generic.c,v
retrieving revision 1.7
diff -p -r1.7 spread_generic.c
*** intrinsics/spread_generic.c 15 Apr 2005 20:06:16 -0000 1.7
--- intrinsics/spread_generic.c 4 May 2005 20:44:45 -0000
*************** spread (gfc_array_char *ret, const gfc_a
*** 43,49 ****
const index_type *along, const index_type *pncopies)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS - 1];
index_type rstride0;
index_type rdelta;
index_type rrank;
--- 43,49 ----
const index_type *along, const index_type *pncopies)
{
/* r.* indicates the return array. */
! index_type rstride[GFC_MAX_DIMENSIONS];
index_type rstride0;
index_type rdelta;
index_type rrank;
*************** spread (gfc_array_char *ret, const gfc_a
*** 51,63 ****
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS - 1];
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 n;
index_type dim;
index_type size;
--- 51,63 ----
char *rptr;
char *dest;
/* s.* indicates the source array. */
! index_type sstride[GFC_MAX_DIMENSIONS];
index_type sstride0;
index_type srank;
const char *sptr;
! index_type count[GFC_MAX_DIMENSIONS];
! index_type extent[GFC_MAX_DIMENSIONS];
index_type n;
index_type dim;
index_type size;
Index: intrinsics/stat.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/stat.c,v
retrieving revision 1.4
diff -p -r1.4 stat.c
*** intrinsics/stat.c 12 Jan 2005 21:27:30 -0000 1.4
--- intrinsics/stat.c 4 May 2005 20:44:46 -0000
*************** stat_i4_sub (char *name, gfc_array_i4 *s
*** 73,79 ****
char *str;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS - 1];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
--- 73,79 ----
char *str;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
*************** stat_i8_sub (char *name, gfc_array_i8 *s
*** 168,174 ****
char *str;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS - 1];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
--- 168,174 ----
char *str;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
*************** fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_a
*** 293,299 ****
int val;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS - 1];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
--- 293,299 ----
int val;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
*************** fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_a
*** 379,385 ****
int val;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS - 1];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
--- 379,385 ----
int val;
struct stat sb;
! index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1)
-------------- next part --------------
! { dg-do run }
! PR 21354: Rank 7 was not handled correctly by many library
! functions, including in_pack.
program main
real, dimension (2,2,2,2,2,2,2):: a
a = 1.0
call foo(a(2:1:-1,:,:,:,:,:,:))
end program main
subroutine foo(a)
real, dimension (2,2,2,2,2,2,2):: a
end subroutine foo
More information about the Gcc-patches
mailing list