]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly)
authorThomas Koenig <Thomas.Koenig@online.de>
Wed, 4 May 2005 21:38:23 +0000 (21:38 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 4 May 2005 21:38:23 +0000 (21:38 +0000)
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.

From-SVN: r99232

85 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/in_pack_rank7.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/generated/all_l4.c
libgfortran/generated/all_l8.c
libgfortran/generated/any_l4.c
libgfortran/generated/any_l8.c
libgfortran/generated/count_4_l4.c
libgfortran/generated/count_4_l8.c
libgfortran/generated/count_8_l4.c
libgfortran/generated/count_8_l8.c
libgfortran/generated/cshift1_4.c
libgfortran/generated/cshift1_8.c
libgfortran/generated/eoshift1_4.c
libgfortran/generated/eoshift1_8.c
libgfortran/generated/eoshift3_4.c
libgfortran/generated/eoshift3_8.c
libgfortran/generated/in_pack_i4.c
libgfortran/generated/in_pack_i8.c
libgfortran/generated/in_unpack_i4.c
libgfortran/generated/in_unpack_i8.c
libgfortran/generated/maxloc0_4_i4.c
libgfortran/generated/maxloc0_4_i8.c
libgfortran/generated/maxloc0_4_r4.c
libgfortran/generated/maxloc0_4_r8.c
libgfortran/generated/maxloc0_8_i4.c
libgfortran/generated/maxloc0_8_i8.c
libgfortran/generated/maxloc0_8_r4.c
libgfortran/generated/maxloc0_8_r8.c
libgfortran/generated/maxloc1_4_i4.c
libgfortran/generated/maxloc1_4_i8.c
libgfortran/generated/maxloc1_4_r4.c
libgfortran/generated/maxloc1_4_r8.c
libgfortran/generated/maxloc1_8_i4.c
libgfortran/generated/maxloc1_8_i8.c
libgfortran/generated/maxloc1_8_r4.c
libgfortran/generated/maxloc1_8_r8.c
libgfortran/generated/maxval_i4.c
libgfortran/generated/maxval_i8.c
libgfortran/generated/maxval_r4.c
libgfortran/generated/maxval_r8.c
libgfortran/generated/minloc0_4_i4.c
libgfortran/generated/minloc0_4_i8.c
libgfortran/generated/minloc0_4_r4.c
libgfortran/generated/minloc0_4_r8.c
libgfortran/generated/minloc0_8_i4.c
libgfortran/generated/minloc0_8_i8.c
libgfortran/generated/minloc0_8_r4.c
libgfortran/generated/minloc0_8_r8.c
libgfortran/generated/minloc1_4_i4.c
libgfortran/generated/minloc1_4_i8.c
libgfortran/generated/minloc1_4_r4.c
libgfortran/generated/minloc1_4_r8.c
libgfortran/generated/minloc1_8_i4.c
libgfortran/generated/minloc1_8_i8.c
libgfortran/generated/minloc1_8_r4.c
libgfortran/generated/minloc1_8_r8.c
libgfortran/generated/minval_i4.c
libgfortran/generated/minval_i8.c
libgfortran/generated/minval_r4.c
libgfortran/generated/minval_r8.c
libgfortran/generated/product_c4.c
libgfortran/generated/product_c8.c
libgfortran/generated/product_i4.c
libgfortran/generated/product_i8.c
libgfortran/generated/product_r4.c
libgfortran/generated/product_r8.c
libgfortran/generated/sum_c4.c
libgfortran/generated/sum_c8.c
libgfortran/generated/sum_i4.c
libgfortran/generated/sum_i8.c
libgfortran/generated/sum_r4.c
libgfortran/generated/sum_r8.c
libgfortran/intrinsics/cshift0.c
libgfortran/intrinsics/eoshift0.c
libgfortran/intrinsics/eoshift2.c
libgfortran/intrinsics/random.c
libgfortran/intrinsics/spread_generic.c
libgfortran/intrinsics/stat.c
libgfortran/m4/cshift1.m4
libgfortran/m4/eoshift1.m4
libgfortran/m4/eoshift3.m4
libgfortran/m4/ifunction.m4
libgfortran/m4/in_pack.m4
libgfortran/m4/in_unpack.m4

index dca689649035e825fe72b52f29ac3ad30416dafa..7058ed25f79752effae7cc42a25da19315cfd72b 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-04  Thomas Koenig  <Thomas.Koenig@online.de>
+
+       PR libfortran/21354
+       gfortran.dg/in_pack_rank7.f90:  New test.
+
 2005-05-03  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR middle-end/15618
diff --git a/gcc/testsuite/gfortran.dg/in_pack_rank7.f90 b/gcc/testsuite/gfortran.dg/in_pack_rank7.f90
new file mode 100644 (file)
index 0000000..aa62866
--- /dev/null
@@ -0,0 +1,12 @@
+! { 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
index fe1ebfe7bdb46353273c80aa18ed0156f62c6e4e..3e0b3613c5d3ac64c6bff8eec47069a2f7b6681e 100644 (file)
@@ -1,3 +1,90 @@
+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-04-30  Thomas Koenig  <Thomas.Koenig@online.de>
 
        PR libfortran/18958
index 84062e623278577f2f2039fea88ede7a3ab3ad50..2b070bbb30b4406457a99ac4a880379c34bce8eb 100644 (file)
@@ -40,10 +40,10 @@ export_proto(all_l4);
 void
 all_l4 (gfc_array_l4 *retarray, gfc_array_l4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_4 *base;
   GFC_LOGICAL_4 *dest;
   index_type rank;
index bc8e50050a19c0ac283940fb90abc0bc45e8de3c..29f4e2653acf195b19e976d25eee5ea0557a600a 100644 (file)
@@ -40,10 +40,10 @@ export_proto(all_l8);
 void
 all_l8 (gfc_array_l8 *retarray, gfc_array_l8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_8 *base;
   GFC_LOGICAL_8 *dest;
   index_type rank;
index 82166911db74787ad9d633043a50f980acbe7fe8..0dfbc7ae4d5fc762e4ca5c8436122c9c23d35e08 100644 (file)
@@ -40,10 +40,10 @@ export_proto(any_l4);
 void
 any_l4 (gfc_array_l4 *retarray, gfc_array_l4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_4 *base;
   GFC_LOGICAL_4 *dest;
   index_type rank;
index 3c3a3747fdfcbbecabab0244a4494ccd4083df04..94e4e27c67fcd31e71b9d6170ac3b12c0ad3baf3 100644 (file)
@@ -40,10 +40,10 @@ export_proto(any_l8);
 void
 any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_8 *base;
   GFC_LOGICAL_8 *dest;
   index_type rank;
index 814dbd431993fa24fe9e13a0de33e6453c8bf00d..3f43cc14e804fd7df2e9f7e34229ad25e38a5353 100644 (file)
@@ -40,10 +40,10 @@ export_proto(count_4_l4);
 void
 count_4_l4 (gfc_array_i4 *retarray, gfc_array_l4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
index cffbef6ddb9740a0b38861c6f5d83a8f310a57cb..e8da4ef8179b12400a23c52775154cf16c4fc1bd 100644 (file)
@@ -40,10 +40,10 @@ export_proto(count_4_l8);
 void
 count_4_l8 (gfc_array_i4 *retarray, gfc_array_l8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_8 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
index d1705bbee70612cec217d3ed9c919440e2b48d47..fe4c88663eb1f3e85ecc63755a49cb7cd3e26bcb 100644 (file)
@@ -40,10 +40,10 @@ export_proto(count_8_l4);
 void
 count_8_l4 (gfc_array_i8 *retarray, gfc_array_l4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_4 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
index 431b11e24823bcd917b68827a53b77deed4873d5..0bcfdb83d523fb189201013dbc0c2998f7766b42 100644 (file)
@@ -40,10 +40,10 @@ export_proto(count_8_l8);
 void
 count_8_l8 (gfc_array_i8 *retarray, gfc_array_l8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_LOGICAL_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
index b8c8ab375b1f0ad371cf21341ee643b621d2d55b..683ce703ff2bbdc269c2a17d7cd86c558e504ecf 100644 (file)
@@ -45,24 +45,24 @@ cshift1_4 (const gfc_array_char * ret,
                      const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  index_type sstride[GFC_MAX_DIMENSIONS];
   index_type sstride0;
   index_type soffset;
   const char *sptr;
   const char *src;
   /* h.* indicates the  array.  */
-  index_type hstride[GFC_MAX_DIMENSIONS - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_4 *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index e18539147b5f46a68bb7fa0ce2f46585dc063f5e..6513b9103044d61b8b1576b3e330bf4770e80c90 100644 (file)
@@ -45,24 +45,24 @@ cshift1_8 (const gfc_array_char * ret,
                      const gfc_array_i8 * h, const GFC_INTEGER_8 * pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  index_type sstride[GFC_MAX_DIMENSIONS];
   index_type sstride0;
   index_type soffset;
   const char *sptr;
   const char *src;
   /* h.* indicates the  array.  */
-  index_type hstride[GFC_MAX_DIMENSIONS - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_8 *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 9c63a5cf68818e1da0bf599b9e8145b41df6549e..6c2ad301728fc740771bbe06d42f18114d7363cf 100644 (file)
@@ -50,24 +50,24 @@ eoshift1_4 (const gfc_array_char *ret,
                       const GFC_INTEGER_4 *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_4 *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 3c70c9a1e60eba6b4b987541f0ed8191f1237891..c1d99c3de1542bf8863e6d63a36ef5f043fe0d32 100644 (file)
@@ -50,24 +50,24 @@ eoshift1_8 (const gfc_array_char *ret,
                       const GFC_INTEGER_8 *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_8 *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 8f7913ea76a212e1cc39f5fc6b06e1153392f4e9..088cfbeba498a40ba35f8763e1063ab377a43ab6 100644 (file)
@@ -48,28 +48,28 @@ eoshift3_4 (gfc_array_char *ret, gfc_array_char *array,
                       GFC_INTEGER_4 *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_4 *hptr;
   /* b.* indicates the bound array.  */
-  index_type bstride[GFC_MAX_DIMENSIONS - 1];
+  index_type bstride[GFC_MAX_DIMENSIONS];
   index_type bstride0;
   const char *bptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 4c2e1d5539c68c4dd60e9f7a4589bd4b8e222a40..302b159c0c8500d7a4edd4dc5d24cf5134b09a7d 100644 (file)
@@ -48,28 +48,28 @@ eoshift3_8 (gfc_array_char *ret, gfc_array_char *array,
                       GFC_INTEGER_8 *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const GFC_INTEGER_8 *hptr;
   /* b.* indicates the bound array.  */
-  index_type bstride[GFC_MAX_DIMENSIONS - 1];
+  index_type bstride[GFC_MAX_DIMENSIONS];
   index_type bstride0;
   const char *bptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index ac0c34d2b5149a5f3ebef14562d570032a849f70..72a1519b299ad5e8f607f3bbf7b3832e8292b4b3 100644 (file)
@@ -39,9 +39,9 @@ Boston, MA 02111-1307, USA.  */
 GFC_INTEGER_4 *
 internal_pack_4 (gfc_array_i4 * source)
 {
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  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 85ee8221445278b894e0caf3d692095666f2ada0..51c6986a288623ed4d2cdf91f68c59bac3d95172 100644 (file)
@@ -39,9 +39,9 @@ Boston, MA 02111-1307, USA.  */
 GFC_INTEGER_8 *
 internal_pack_8 (gfc_array_i8 * source)
 {
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  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 87861006ef3eb11d3d532ab9de8cb8471b1199b2..92561a21d7e7812f10b8645dee542e4239308107 100644 (file)
@@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA.  */
 void
 internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
 {
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  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 a1686c3fd7a265ed24cf974d26be7a41917aff2b..1f3e6a23dd36e60a1fbeaf74f2a7475fa316b77b 100644 (file)
@@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA.  */
 void
 internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src)
 {
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  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 94e2ec554bfb5389ae3e3ec69f47db195957b1a3..1839bdf6949867e5b11638b313df99add646577c 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 85e0ea5c73e49cb8bd4d6e27ee757519a6e9629a..51aecb933273e53d3cd3726ec8cf2f82152dc536 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 14f64e4d9bf050d19584c9cc285f1731ec1c7725..53fd0dc81d2cf69197a31604cc4c4a7c7cfa0127 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index caa3388e490fbc19f0851d515cd1bfc58b449275..612c8f6b2fc8bbef6455ad8d5eaa07319a55e700 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 6999ffab0f5e1818b2d0da1d3d693b65b7232488..c496e130217eb4145993da2f7b118bbca0546191 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 614e6dfcd4f512b42babe9616415e3ae6e409c91..1732564b84d6b4276df9bba0ef3fc72e7b5b8149 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index b9e19501572de5556617ee6e17307f34048c010f..96f47474f0fcea6250576f13dbe4b75d9dedc748 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index b7e216b8452a4afdf77991a00acf82df91161a58..36b3fcf9a85a4cfb8f3bda691614eda00789ad64 100644 (file)
@@ -76,6 +76,9 @@ maxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mmaxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index deeb06382e0e01dac9eb6ab6dd713921d317ee9d..45e143f2008d729b7d100e193d07b1a897e1cc0c 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_4_i4);
 void
 maxloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 80555e817f829d6d9b77be89ab9130c1698a41ec..e196f9352565d3a96bcb93cd80f8fe869088ecdd 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_4_i8);
 void
 maxloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 55d52291a9b9edfd89b3bfa4d7c23f87633ed94f..cabd0c7faa932ae7cd29e74a54fa5140f2b02782 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_4_r4);
 void
 maxloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index aab24a16834013b2e370a08251a4ff8399f44012..44c38b861d1d6ba10e06f85ffccc7a498769a0e8 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_4_r8);
 void
 maxloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 807be639840e6ec9f894a0c4c38d15032b658cd6..e05a8a2f46e92d0a4f647fadcf449c63db103d62 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_8_i4);
 void
 maxloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index e86cd089031ace7104ac9721a97e3ce27e79ce03..e2bf61c5c9198fd17262eea48550bf924eda6eb5 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_8_i8);
 void
 maxloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 584bfb4a61160b8df1debe76844422d16f92335f..acce8bcb1601128eac28b955af0e4a4b3d07f342 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_8_r4);
 void
 maxloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 60c8c3d3ce6237d47385e75c174076128902a27c..f3487226a3da87eaa21996afed67e49a8f380db4 100644 (file)
@@ -42,10 +42,10 @@ export_proto(maxloc1_8_r8);
 void
 maxloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ maxloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 0bf088f044ec002158c9c94a500aa1226e62ca19..bf9d71219bf30dca792c8208ffe19e6399fadbcd 100644 (file)
@@ -41,10 +41,10 @@ export_proto(maxval_i4);
 void
 maxval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ maxval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 2acdef9b09e0d9c5a8ea12e0ec00e984a0a0ba73..175b7f3c48862ed7358fdff44fb86395f9a1195e 100644 (file)
@@ -41,10 +41,10 @@ export_proto(maxval_i8);
 void
 maxval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ maxval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 46948b960907676f9a7d48f8f95abf953d54a15a..fc86f69d0f60dd3a936826e26d5d8ed0e3ec856c 100644 (file)
@@ -41,10 +41,10 @@ export_proto(maxval_r4);
 void
 maxval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_REAL_4 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ maxval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_REAL_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index b7bb89ce42c0c1db37440abe87b58cdec24b4df0..3d1a1cf89cb2cf9e4f8d6afb8e12521424a58fdc 100644 (file)
@@ -41,10 +41,10 @@ export_proto(maxval_r8);
 void
 maxval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_REAL_8 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ maxval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_REAL_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 4bb7a5a058d2e23d7dce064366667f1055ef2103..8f2dd235b5f6118ded8b7fe2a689e3319dfa0b82 100644 (file)
@@ -76,6 +76,9 @@ minloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -241,7 +246,7 @@ mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
     {
       {
         /* Implementation start.  */
-  printf("mbase = %p, *mbase = %d, *base=%d\n");
+
   if (*mbase && *base < minval)
     {
       minval = *base;
index 9d7a1a4c599e4b6c5ee4586a7db92b9f9eeeb31d..0a50caaf7776575478b059498c31b9de76976565 100644 (file)
@@ -76,6 +76,9 @@ minloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 3b54a3ba35aa252a82ea8d4ca3d70c3bfbf3f93d..59809d777ea544101b5202c50665dc2ee7de6e72 100644 (file)
@@ -76,6 +76,9 @@ minloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 9866538a54cf37e9db42d76b626cb5d648c013b3..69d1cdb0422bffae5292a4a83f85721d38f25345 100644 (file)
@@ -76,6 +76,9 @@ minloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 4440a9b5306bd75876fdc5a205982d335308ccc5..c8989fc56bb46a915e377300e2c0bd50bb8b44f0 100644 (file)
@@ -76,6 +76,9 @@ minloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index f2ee93ca5441f31e51444c90f5da820db8ecbdb6..8f1aa2441bbd411530e9b61a5c2655d07d1bd059 100644 (file)
@@ -76,6 +76,9 @@ minloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 1f38c912aa66044980849b3ddb154fa0f418eb0b..4407ddfd8c94c0a6ff5211c0771e9eca597e93c4 100644 (file)
@@ -76,6 +76,9 @@ minloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 773ab48ee29e336033ddea884b66bdd4b8b08596..468322317ebcad5365aaef4d27b0b51aa4f33195 100644 (file)
@@ -76,6 +76,9 @@ minloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
       if (retarray->dim[0].stride == 0)
        retarray->dim[0].stride = 1;
     }
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -192,6 +195,8 @@ mminloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array,
        retarray->dim[0].stride = 1;
     }
 
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 8c99d8391b2a5595dac5b1037e644b06c5059f73..04fadb6481fb9b3c01c8fb2ec065d45e7b529531 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_4_i4);
 void
 minloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 48596a61001384eafebb1e99f69b905c9f905872..b2922c8db5f44c6c73950edf500b56707c5634b1 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_4_i8);
 void
 minloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 0b9d15c1fa8d76d71d4471ee6446b46d56abeb68..efec5850daeb3d4d87cd2c57ef0f49d63fb54489 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_4_r4);
 void
 minloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 25d366a94394fed8fd98744375a64e1b9086b1b6..95bc2a6ae066d3005511bf6bf9fbb5d00af96c15 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_4_r8);
 void
 minloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index a57efe6ffc765d48e9ba9e3a2df86883c59e0a7f..11b1f7118ac8951da0a74892c2420b9d51873d60 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_8_i4);
 void
 minloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 5e1603a3a1b31856e449c527f0abfc9795d189ea..4235bdec2dcbf510e8d6ece0c69c35cd3ca857a7 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_8_i8);
 void
 minloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 643765a48813f56e93ae93fc3974f7bcc84f9fcd..a679a65a1959f86f5b7875fba5624061bbfeb683 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_8_r4);
 void
 minloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 7d2dc4175a6260f4ebc1d75e34418acfe7dcc5a5..177ba6d4a98ca807218a84ec6030cd0971cf6673 100644 (file)
@@ -42,10 +42,10 @@ export_proto(minloc1_8_r8);
 void
 minloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -57,6 +57,9 @@ minloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -180,11 +183,11 @@ void
 mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -197,6 +200,9 @@ mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index d0a8a5ea4ad77b7fc55b7af0d32e47f36efadaf8..097419697be23cab92e86b95054c86bcb8e4596c 100644 (file)
@@ -41,10 +41,10 @@ export_proto(minval_i4);
 void
 minval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ minval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 9d44514c4c618c8cdce8f30566f2f3afd3670786..a969bfdc8801ba247117a36dbe68724ae06de5bc 100644 (file)
@@ -41,10 +41,10 @@ export_proto(minval_i8);
 void
 minval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ minval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 4220d8755ebd5b2ea8a85acf32c28990f35c2f47..fe1a22421852dd97fb0b2b7afeaeae7a35a854b0 100644 (file)
@@ -41,10 +41,10 @@ export_proto(minval_r4);
 void
 minval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_REAL_4 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ minval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_REAL_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index d6c5b000eea1fe454ec82e1e2d3bdfe3dbdddb30..050b3c9dfebd8279ecd6d94d39d93c46ab741f32 100644 (file)
@@ -41,10 +41,10 @@ export_proto(minval_r8);
 void
 minval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_REAL_8 *dest;
   index_type rank;
@@ -56,6 +56,9 @@ minval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -174,11 +177,11 @@ void
 mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_REAL_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -191,6 +194,9 @@ mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index d20ad9b8440afe31bbc1149bb71600f96cf42418..2cee7978ebcfea120d11430103cfa92e3fba0d45 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_c4);
 void
 product_c4 (gfc_array_c4 *retarray, gfc_array_c4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_COMPLEX_4 *base;
   GFC_COMPLEX_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * 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];
+  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];
   GFC_COMPLEX_4 *dest;
   GFC_COMPLEX_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 706e9737de8f26a7b9550c59f37ecf0a4fcad64d..6eaeb7a90f41ab01ca637a712867160f4515ccd8 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_c8);
 void
 product_c8 (gfc_array_c8 *retarray, gfc_array_c8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_COMPLEX_8 *base;
   GFC_COMPLEX_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * 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];
+  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];
   GFC_COMPLEX_8 *dest;
   GFC_COMPLEX_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index f8f86d6ca82dbd0ddb6615649aafc3fd935e2a08..0a58d04dcca21b91e57430ad7c2cc0c6236cbdd7 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_i4);
 void
 product_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 00ae28bd1bf6c1cc75a993153f121bf94d9fa518..1e61c52c8d49ac8e4795b4710794a5adb4f1ef94 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_i8);
 void
 product_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index ea377bbdcbbdd06b0fa569df6e4de2e452ceb695..586c80c1d2f464075ab022ed1a4549f297c7f492 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_r4);
 void
 product_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_REAL_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_REAL_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 58d22cfb5bea079a8899a22439df58c69ba1e37f..3be015136e9d8a3b4841e6ed8ba7f7636fc74894 100644 (file)
@@ -40,10 +40,10 @@ export_proto(product_r8);
 void
 product_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_REAL_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ product_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_REAL_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index d9b36d8201f979e9bc22fb597540f038730eb37a..89b32f03985e11133b10e093847d7dd7ff64b5fb 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_c4);
 void
 sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_COMPLEX_4 *base;
   GFC_COMPLEX_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * 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];
+  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];
   GFC_COMPLEX_4 *dest;
   GFC_COMPLEX_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index a5c44cdcf0380fbcca1a12dcef4a2dac52f674e7..c7674ebfe7237d6f69d02dbfdadfe3c711ea8f54 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_c8);
 void
 sum_c8 (gfc_array_c8 *retarray, gfc_array_c8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_COMPLEX_8 *base;
   GFC_COMPLEX_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * 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];
+  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];
   GFC_COMPLEX_8 *dest;
   GFC_COMPLEX_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index b10798f847c00a5c0f77e4144954ab8a868cf237..76106bf8110fbab81af126fe12b00b568b8fc0fc 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_i4);
 void
 sum_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_4 *base;
   GFC_INTEGER_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * 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];
+  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];
   GFC_INTEGER_4 *dest;
   GFC_INTEGER_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 0d3e1913ac440d7148e59fe40af47607d95c2561..16d04116c8555ab2b7fc404cf46097a1b380d684 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_i8);
 void
 sum_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_8 *base;
   GFC_INTEGER_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * 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];
+  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];
   GFC_INTEGER_8 *dest;
   GFC_INTEGER_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index c0a81d5cb0a19d2b4c27c605e3936f3ee024d784..c9b36cd07f8121f82883eca82265b2795f105648 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_r4);
 void
 sum_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_4 *base;
   GFC_REAL_4 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * 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];
+  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];
   GFC_REAL_4 *dest;
   GFC_REAL_4 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 190cabbc22d8e33c6ecbb10106154a26aeb8cb3e..a4d260595f09fb5cbdf8aaf4b3667c16c542fdf6 100644 (file)
@@ -40,10 +40,10 @@ export_proto(sum_r8);
 void
 sum_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
   GFC_REAL_8 *base;
   GFC_REAL_8 *dest;
   index_type rank;
@@ -55,6 +55,9 @@ sum_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -172,11 +175,11 @@ void
 msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * 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];
+  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];
   GFC_REAL_8 *dest;
   GFC_REAL_8 *base;
   GFC_LOGICAL_4 *mbase;
@@ -189,6 +192,9 @@ msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
 
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
index 2dd6a022e8a6d294866515265a11b29583049589..61fd9016c9c8fafd233d3584e912cff5bedfdf88 100644 (file)
@@ -81,19 +81,19 @@ cshift0 (gfc_array_char * ret, const gfc_array_char * array,
         ssize_t shift, int which)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  index_type sstride[GFC_MAX_DIMENSIONS];
   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 count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 26874e12309f8fc4863fb9fd8ba41482d5882acf..5db3737c3556af35a6c52b7e5181a2e32e0d8aa7 100644 (file)
@@ -45,20 +45,20 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
          int shift, const char * pbound, int which)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  index_type sstride[GFC_MAX_DIMENSIONS];
   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 count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 30bb3dd4864bf092f519969c5ec5a13ad388d7ca..8d22dbef7428234ff754db55ad4a854fa53c73ae 100644 (file)
@@ -45,24 +45,24 @@ eoshift2 (gfc_array_char *ret, const gfc_array_char *array,
          int shift, const gfc_array_char *bound, int which)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type bstride[GFC_MAX_DIMENSIONS];
   index_type bstride0;
   const char *bptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index fdb99cc040ef092046d10904a4bd0219da20dfe6..7607bb15b03a103d1276ef143c147be39e8def87 100644 (file)
@@ -253,9 +253,9 @@ iexport(random_r8);
 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 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;
@@ -326,9 +326,9 @@ arandom_r4 (gfc_array_r4 * harv)
 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 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;
@@ -498,9 +498,9 @@ iexport(random_r8);
 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 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;
@@ -562,9 +562,9 @@ arandom_r4 (gfc_array_r4 *x)
 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 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 7dcabf63bcbef905ebcebde201812f07e04e64b6..8d39d30d318b6bd28f6a332c37100f425e647764 100644 (file)
@@ -43,7 +43,7 @@ spread (gfc_array_char *ret, const gfc_array_char *source,
        const index_type *along, const index_type *pncopies)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  index_type rstride[GFC_MAX_DIMENSIONS];
   index_type rstride0;
   index_type rdelta;
   index_type rrank;
@@ -51,13 +51,13 @@ spread (gfc_array_char *ret, const gfc_array_char *source,
   char *rptr;
   char *dest;
   /* s.* indicates the source array.  */
-  index_type sstride[GFC_MAX_DIMENSIONS - 1];
+  index_type sstride[GFC_MAX_DIMENSIONS];
   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 count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type n;
   index_type dim;
   index_type size;
index d7ed7610bb086d82cf6469f8b397d9688bd13566..df76f3f97627a4ac092440f51df56f2316a8665f 100644 (file)
@@ -73,7 +73,7 @@ stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status,
   char *str;
   struct stat sb;
 
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  index_type stride[GFC_MAX_DIMENSIONS];
       
   /* If the rank of the array is not 1, abort.  */
   if (GFC_DESCRIPTOR_RANK (sarray) != 1)
@@ -168,7 +168,7 @@ stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status,
   char *str;
   struct stat sb;
 
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  index_type stride[GFC_MAX_DIMENSIONS];
       
   /* If the rank of the array is not 1, abort.  */
   if (GFC_DESCRIPTOR_RANK (sarray) != 1)
@@ -293,7 +293,7 @@ fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status)
   int val;
   struct stat sb;
 
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  index_type stride[GFC_MAX_DIMENSIONS];
       
   /* If the rank of the array is not 1, abort.  */
   if (GFC_DESCRIPTOR_RANK (sarray) != 1)
@@ -379,7 +379,7 @@ fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status)
   int val;
   struct stat sb;
 
-  index_type stride[GFC_MAX_DIMENSIONS - 1];
+  index_type stride[GFC_MAX_DIMENSIONS];
       
   /* If the rank of the array is not 1, abort.  */
   if (GFC_DESCRIPTOR_RANK (sarray) != 1)
index 7288c35f934cc35351be9fea20cc7dacd526d4ee..308c3dc40f811b1ec1b4214b10463860535785e6 100644 (file)
@@ -46,24 +46,24 @@ cshift1_`'atype_kind (const gfc_array_char * ret,
                      const atype * h, const atype_name * pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const atype_name *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 898f778c9e7484632a926c7e74e8882e1234e852..9cf6fa9a84a392f023d8840d6782aaaa5c536a28 100644 (file)
@@ -51,24 +51,24 @@ eoshift1_`'atype_kind (const gfc_array_char *ret,
                       const atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const atype_name *hptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index a94f572b3b3d5a61f77e54f01ba1e81b9b231a49..89dcb3fcff8e2fd94b8ac92aba87af026196e6a1 100644 (file)
@@ -49,28 +49,28 @@ eoshift3_`'atype_kind (gfc_array_char *ret, gfc_array_char *array,
                       atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
-  index_type rstride[GFC_MAX_DIMENSIONS - 1];
+  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 - 1];
+  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 - 1];
+  index_type hstride[GFC_MAX_DIMENSIONS];
   index_type hstride0;
   const atype_name *hptr;
   /* b.* indicates the bound array.  */
-  index_type bstride[GFC_MAX_DIMENSIONS - 1];
+  index_type bstride[GFC_MAX_DIMENSIONS];
   index_type bstride0;
   const char *bptr;
 
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
   index_type dim;
   index_type size;
   index_type len;
index 82a74ef80b44040c5985d703f9e1ef9ce68da1a6..7da24108d8b75c909e2196ecbb8cdba8ed584a83 100644 (file)
@@ -25,10 +25,10 @@ export_proto(name`'rtype_qual`_'atype_code);
 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];
+  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;
@@ -160,11 +160,11 @@ void
 `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];
+  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 9d05b5df8cce8cf1028fa8e4d54efcc444625543..b2eac40581fe647aee9a75b279c0a62cbc8f5957 100644 (file)
@@ -41,9 +41,9 @@ dnl Only the kind (ie size) is used to name the function.
 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 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 d2f74bde9ecde4711c8258e5f102f325336c5cdd..ea9ccc89f76becb1a5c364a6a97684bf5990b3a1 100644 (file)
@@ -39,9 +39,9 @@ dnl Only the kind (ie size) is used to name the function.
 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 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;