This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, committed] PR libfortran/22142 (for eoshift1, this time)


Just after my previous commit, I found that eoshift1 had the same
bug that eoshift3 had.

Also committed as obvious after regtesting.

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.



Index: libgfortran/m4/eoshift1.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/eoshift1.m4,v
retrieving revision 1.9
diff -c -p -r1.9 eoshift1.m4
*** libgfortran/m4/eoshift1.m4  25 Jun 2005 09:56:32 -0000      1.9
--- libgfortran/m4/eoshift1.m4  28 Jun 2005 23:04:07 -0000
*************** eoshift1_`'atype_kind (gfc_array_char *r
*** 136,142 ****
            rstride[n] = ret->dim[dim].stride * size;
            sstride[n] = array->dim[dim].stride * size;

!           hstride[n] = h->dim[n].stride;
            n++;
          }
      }
--- 136,142 ----
            rstride[n] = ret->dim[dim].stride * size;
            sstride[n] = array->dim[dim].stride * size;

!           hstride[n] = h->dim[n].stride * size;
            n++;
          }
      }
Index: gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_eoshift.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_eoshift.f90,v
retrieving revision 1.3
diff -c -p -r1.3 intrinsic_eoshift.f90
*** gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_eoshift.f90       28 Jun 2005 21:57:45 -0000       1.3
--- gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_eoshift.f90       28 Jun 2005 23:04:07 -0000
*************** program intrinsic_eoshift
*** 37,42 ****
--- 37,48 ----
     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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]