mirror of git://gcc.gnu.org/git/gcc.git
005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21075 * m4/reshape.m4 (reshape_`'rtype_kind): Change dimension of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to GFC_MAX_DIMENSIONS. * intrinsics/reshape_generic.c (reshape_generic): Likewise. * generated/reshape_i4.c: Regenerated. * generated/reshape_i8.c: Regenerated. 2005-04-17 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/21075 * gfortran.dg/reshape_rank7.f90: New test. From-SVN: r98288
This commit is contained in:
parent
29dc5138c3
commit
5f9bfaf2bc
|
@ -1,3 +1,8 @@
|
||||||
|
2005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
|
||||||
|
|
||||||
|
PR libfortran/21075
|
||||||
|
* gfortran.dg/reshape_rank7.f90: New test.
|
||||||
|
|
||||||
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
||||||
|
|
||||||
PR libfortran/12884 gfortran.dg/pr12884.f: New test
|
PR libfortran/12884 gfortran.dg/pr12884.f: New test
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
! { dg-do run}
|
||||||
|
! PR 21075: Reshape with rank 7 used to segfault.
|
||||||
|
program main
|
||||||
|
integer :: a(256), b(2,2,2,2,2,2,2)
|
||||||
|
do i=1,256
|
||||||
|
a(i) = i
|
||||||
|
end do
|
||||||
|
b = reshape(a(1:256:2), shape(b))
|
||||||
|
do i1=1,2
|
||||||
|
do i2=1,2
|
||||||
|
do i3=1,2
|
||||||
|
do i4=1,2
|
||||||
|
do i5=1,2
|
||||||
|
do i6=1,2
|
||||||
|
do i7=1,2
|
||||||
|
if (b(i1,i2,i3,i4,i5,i6,i7) /= &
|
||||||
|
2*((i1-1)+(i2-1)*2+(i3-1)*4+(i4-1)*8+&
|
||||||
|
(i5-1)*16+(i6-1)*32+(i7-1)*64)+1) &
|
||||||
|
call abort
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
end program main
|
|
@ -1,3 +1,13 @@
|
||||||
|
2005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
|
||||||
|
|
||||||
|
PR libfortran/21075
|
||||||
|
* m4/reshape.m4 (reshape_`'rtype_kind): Change dimension
|
||||||
|
of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to
|
||||||
|
GFC_MAX_DIMENSIONS.
|
||||||
|
* intrinsics/reshape_generic.c (reshape_generic): Likewise.
|
||||||
|
* generated/reshape_i4.c: Regenerated.
|
||||||
|
* generated/reshape_i8.c: Regenerated.
|
||||||
|
|
||||||
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
||||||
|
|
||||||
* io/list_read.c (eat_separator): at_eol = 1 replaced(zapped at some time?).
|
* io/list_read.c (eat_separator): at_eol = 1 replaced(zapped at some time?).
|
||||||
|
|
|
@ -47,25 +47,25 @@ reshape_4 (gfc_array_i4 * ret, gfc_array_i4 * source, shape_type * shape,
|
||||||
gfc_array_i4 * pad, shape_type * order)
|
gfc_array_i4 * pad, shape_type * order)
|
||||||
{
|
{
|
||||||
/* r.* indicates the return array. */
|
/* r.* indicates the return array. */
|
||||||
index_type rcount[GFC_MAX_DIMENSIONS - 1];
|
index_type rcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type rextent[GFC_MAX_DIMENSIONS - 1];
|
index_type rextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride[GFC_MAX_DIMENSIONS - 1];
|
index_type rstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride0;
|
index_type rstride0;
|
||||||
index_type rdim;
|
index_type rdim;
|
||||||
index_type rsize;
|
index_type rsize;
|
||||||
GFC_INTEGER_4 *rptr;
|
GFC_INTEGER_4 *rptr;
|
||||||
/* s.* indicates the source array. */
|
/* s.* indicates the source array. */
|
||||||
index_type scount[GFC_MAX_DIMENSIONS - 1];
|
index_type scount[GFC_MAX_DIMENSIONS];
|
||||||
index_type sextent[GFC_MAX_DIMENSIONS - 1];
|
index_type sextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS - 1];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride0;
|
index_type sstride0;
|
||||||
index_type sdim;
|
index_type sdim;
|
||||||
index_type ssize;
|
index_type ssize;
|
||||||
const GFC_INTEGER_4 *sptr;
|
const GFC_INTEGER_4 *sptr;
|
||||||
/* p.* indicates the pad array. */
|
/* p.* indicates the pad array. */
|
||||||
index_type pcount[GFC_MAX_DIMENSIONS - 1];
|
index_type pcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type pextent[GFC_MAX_DIMENSIONS - 1];
|
index_type pextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type pstride[GFC_MAX_DIMENSIONS - 1];
|
index_type pstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type pdim;
|
index_type pdim;
|
||||||
index_type psize;
|
index_type psize;
|
||||||
const GFC_INTEGER_4 *pptr;
|
const GFC_INTEGER_4 *pptr;
|
||||||
|
|
|
@ -47,25 +47,25 @@ reshape_8 (gfc_array_i8 * ret, gfc_array_i8 * source, shape_type * shape,
|
||||||
gfc_array_i8 * pad, shape_type * order)
|
gfc_array_i8 * pad, shape_type * order)
|
||||||
{
|
{
|
||||||
/* r.* indicates the return array. */
|
/* r.* indicates the return array. */
|
||||||
index_type rcount[GFC_MAX_DIMENSIONS - 1];
|
index_type rcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type rextent[GFC_MAX_DIMENSIONS - 1];
|
index_type rextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride[GFC_MAX_DIMENSIONS - 1];
|
index_type rstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride0;
|
index_type rstride0;
|
||||||
index_type rdim;
|
index_type rdim;
|
||||||
index_type rsize;
|
index_type rsize;
|
||||||
GFC_INTEGER_8 *rptr;
|
GFC_INTEGER_8 *rptr;
|
||||||
/* s.* indicates the source array. */
|
/* s.* indicates the source array. */
|
||||||
index_type scount[GFC_MAX_DIMENSIONS - 1];
|
index_type scount[GFC_MAX_DIMENSIONS];
|
||||||
index_type sextent[GFC_MAX_DIMENSIONS - 1];
|
index_type sextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS - 1];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride0;
|
index_type sstride0;
|
||||||
index_type sdim;
|
index_type sdim;
|
||||||
index_type ssize;
|
index_type ssize;
|
||||||
const GFC_INTEGER_8 *sptr;
|
const GFC_INTEGER_8 *sptr;
|
||||||
/* p.* indicates the pad array. */
|
/* p.* indicates the pad array. */
|
||||||
index_type pcount[GFC_MAX_DIMENSIONS - 1];
|
index_type pcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type pextent[GFC_MAX_DIMENSIONS - 1];
|
index_type pextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type pstride[GFC_MAX_DIMENSIONS - 1];
|
index_type pstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type pdim;
|
index_type pdim;
|
||||||
index_type psize;
|
index_type psize;
|
||||||
const GFC_INTEGER_8 *pptr;
|
const GFC_INTEGER_8 *pptr;
|
||||||
|
|
|
@ -48,25 +48,25 @@ reshape (parray *ret, parray *source, shape_type *shape,
|
||||||
parray *pad, shape_type *order)
|
parray *pad, shape_type *order)
|
||||||
{
|
{
|
||||||
/* r.* indicates the return array. */
|
/* r.* indicates the return array. */
|
||||||
index_type rcount[GFC_MAX_DIMENSIONS - 1];
|
index_type rcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type rextent[GFC_MAX_DIMENSIONS - 1];
|
index_type rextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride[GFC_MAX_DIMENSIONS - 1];
|
index_type rstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride0;
|
index_type rstride0;
|
||||||
index_type rdim;
|
index_type rdim;
|
||||||
index_type rsize;
|
index_type rsize;
|
||||||
char *rptr;
|
char *rptr;
|
||||||
/* s.* indicates the source array. */
|
/* s.* indicates the source array. */
|
||||||
index_type scount[GFC_MAX_DIMENSIONS - 1];
|
index_type scount[GFC_MAX_DIMENSIONS];
|
||||||
index_type sextent[GFC_MAX_DIMENSIONS - 1];
|
index_type sextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS - 1];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride0;
|
index_type sstride0;
|
||||||
index_type sdim;
|
index_type sdim;
|
||||||
index_type ssize;
|
index_type ssize;
|
||||||
const char *sptr;
|
const char *sptr;
|
||||||
/* p.* indicates the pad array. */
|
/* p.* indicates the pad array. */
|
||||||
index_type pcount[GFC_MAX_DIMENSIONS - 1];
|
index_type pcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type pextent[GFC_MAX_DIMENSIONS - 1];
|
index_type pextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type pstride[GFC_MAX_DIMENSIONS - 1];
|
index_type pstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type pdim;
|
index_type pdim;
|
||||||
index_type psize;
|
index_type psize;
|
||||||
const char *pptr;
|
const char *pptr;
|
||||||
|
|
|
@ -49,25 +49,25 @@ reshape_`'rtype_kind (rtype * ret, rtype * source, shape_type * shape,
|
||||||
rtype * pad, shape_type * order)
|
rtype * pad, shape_type * order)
|
||||||
{
|
{
|
||||||
/* r.* indicates the return array. */
|
/* r.* indicates the return array. */
|
||||||
index_type rcount[GFC_MAX_DIMENSIONS - 1];
|
index_type rcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type rextent[GFC_MAX_DIMENSIONS - 1];
|
index_type rextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride[GFC_MAX_DIMENSIONS - 1];
|
index_type rstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type rstride0;
|
index_type rstride0;
|
||||||
index_type rdim;
|
index_type rdim;
|
||||||
index_type rsize;
|
index_type rsize;
|
||||||
rtype_name *rptr;
|
rtype_name *rptr;
|
||||||
/* s.* indicates the source array. */
|
/* s.* indicates the source array. */
|
||||||
index_type scount[GFC_MAX_DIMENSIONS - 1];
|
index_type scount[GFC_MAX_DIMENSIONS];
|
||||||
index_type sextent[GFC_MAX_DIMENSIONS - 1];
|
index_type sextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS - 1];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride0;
|
index_type sstride0;
|
||||||
index_type sdim;
|
index_type sdim;
|
||||||
index_type ssize;
|
index_type ssize;
|
||||||
const rtype_name *sptr;
|
const rtype_name *sptr;
|
||||||
/* p.* indicates the pad array. */
|
/* p.* indicates the pad array. */
|
||||||
index_type pcount[GFC_MAX_DIMENSIONS - 1];
|
index_type pcount[GFC_MAX_DIMENSIONS];
|
||||||
index_type pextent[GFC_MAX_DIMENSIONS - 1];
|
index_type pextent[GFC_MAX_DIMENSIONS];
|
||||||
index_type pstride[GFC_MAX_DIMENSIONS - 1];
|
index_type pstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type pdim;
|
index_type pdim;
|
||||||
index_type psize;
|
index_type psize;
|
||||||
const rtype_name *pptr;
|
const rtype_name *pptr;
|
||||||
|
|
Loading…
Reference in New Issue