re PR fortran/21594 ([4.0 only] FAIL: gfortran.dg/eoshift.f90 -O0 execution test)
2005-07-07 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/21594 * intrinsics/eoshift0.c: If abs(shift) > len, fill the the whole array with the boundary value, but don't overrun it. * intrinsics/eoshift2.c: Likewise. * m4/eoshift1.m4: Likewise. * m4/eoshift3.m4: Likewise. * generated/eoshift1_4.c: Regenerated. * generated/eoshift1_8.c: Regenerated. * generated/eoshift3_4.c: Regenerated. * generated/eoshift3_8.c: Regenerated. 2005-07-07 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/21594 * gfortran.fortran-torture/execute/intrinsic_eoshift.f90: Add test cases where the shift length is greater than the array length. From-SVN: r101738
This commit is contained in:
parent
5a29b385ac
commit
47b3a403a5
11 changed files with 122 additions and 14 deletions
|
@ -158,7 +158,14 @@ eoshift1_4 (gfc_array_char *ret,
|
|||
{
|
||||
/* Do the shift for this dimension. */
|
||||
sh = *hptr;
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
if (( sh >= 0 ? sh : -sh ) > len)
|
||||
{
|
||||
delta = len;
|
||||
sh = len;
|
||||
}
|
||||
else
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
|
||||
if (sh > 0)
|
||||
{
|
||||
src = &sptr[delta * soffset];
|
||||
|
|
|
@ -158,7 +158,14 @@ eoshift1_8 (gfc_array_char *ret,
|
|||
{
|
||||
/* Do the shift for this dimension. */
|
||||
sh = *hptr;
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
if (( sh >= 0 ? sh : -sh ) > len)
|
||||
{
|
||||
delta = len;
|
||||
sh = len;
|
||||
}
|
||||
else
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
|
||||
if (sh > 0)
|
||||
{
|
||||
src = &sptr[delta * soffset];
|
||||
|
|
|
@ -167,7 +167,14 @@ eoshift3_4 (gfc_array_char *ret, gfc_array_char *array,
|
|||
{
|
||||
/* Do the shift for this dimension. */
|
||||
sh = *hptr;
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
if (( sh >= 0 ? sh : -sh ) > len)
|
||||
{
|
||||
delta = len;
|
||||
sh = len;
|
||||
}
|
||||
else
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
|
||||
if (sh > 0)
|
||||
{
|
||||
src = &sptr[delta * soffset];
|
||||
|
|
|
@ -167,7 +167,14 @@ eoshift3_8 (gfc_array_char *ret, gfc_array_char *array,
|
|||
{
|
||||
/* Do the shift for this dimension. */
|
||||
sh = *hptr;
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
if (( sh >= 0 ? sh : -sh ) > len)
|
||||
{
|
||||
delta = len;
|
||||
sh = len;
|
||||
}
|
||||
else
|
||||
delta = (sh >= 0) ? sh: -sh;
|
||||
|
||||
if (sh > 0)
|
||||
{
|
||||
src = &sptr[delta * soffset];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue