re PR libfortran/22142 ([4.0 only] eoshift: boundary not filled in correctly)

2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/22142
        * m4/eoshift1.m4:  Correct bstride (it needs to be multiplied
        by size since it's a char pointer).
        * m4/eoshift1_4.c:  Regenerated.
        * m4/eoshift1_8.c:  Regenerated.

2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/22142
        * gfortran.fortran-torture/execute/intrinsic_eoshift.f90:
        Add testcase also testing eoshift1 for PR 22142.

From-SVN: r101398
This commit is contained in:
Thomas Koenig 2005-06-28 23:07:20 +00:00 committed by Thomas Koenig
parent a05be2e0c3
commit 7f8f6d5f05
6 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2005-06-28 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22142
* gfortran.fortran-torture/execute/intrinsic_eoshift.f90:
Add testcase also testing eoshift1 for PR 22142.
2005-06-28 Richard Henderson <rth@redhat.com>
* gcc.dg/tree-ssa/20030708-1.c: Remove static from test function.

View File

@ -37,6 +37,12 @@ program intrinsic_eoshift
if (any (a .ne. reshape ((/99, -1, 42, 99, -1, 42, 1, 2, 3/), (/3, 3/)))) &
call abort
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
bo = (/99, -1, 42/)
a = eoshift (a, -2, bo, 2)
if (any (a .ne. reshape ((/99, -1, 42, 99, -1, 42, 1, 2, 3/), (/3, 3/)))) &
call abort
! Array shift and array bound.
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/1, 0, -1/), (/99, -1, 42/), 1)

View File

@ -1,3 +1,11 @@
2005-06-28 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22142
* m4/eoshift1.m4: Correct bstride (it needs to be multiplied
by size since it's a char pointer).
* m4/eoshift1_4.c: Regenerated.
* m4/eoshift1_8.c: Regenerated.
2005-06-28 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22142

View File

@ -135,7 +135,7 @@ eoshift1_4 (gfc_array_char *ret,
rstride[n] = ret->dim[dim].stride * size;
sstride[n] = array->dim[dim].stride * size;
hstride[n] = h->dim[n].stride;
hstride[n] = h->dim[n].stride * size;
n++;
}
}

View File

@ -135,7 +135,7 @@ eoshift1_8 (gfc_array_char *ret,
rstride[n] = ret->dim[dim].stride * size;
sstride[n] = array->dim[dim].stride * size;
hstride[n] = h->dim[n].stride;
hstride[n] = h->dim[n].stride * size;
n++;
}
}

View File

@ -136,7 +136,7 @@ eoshift1_`'atype_kind (gfc_array_char *ret,
rstride[n] = ret->dim[dim].stride * size;
sstride[n] = array->dim[dim].stride * size;
hstride[n] = h->dim[n].stride;
hstride[n] = h->dim[n].stride * size;
n++;
}
}