summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-04 21:38:23 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-04 21:38:23 +0000
commit9130521e552c3adb62e7ab16428fb26f6832510c (patch)
treee67d83ffc94052a2e5db6bbbebcc19291313070a
parentc7f77f40fa409e19bfffc9a455494ef877a399d2 (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99232 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/in_pack_rank7.f9012
-rw-r--r--libgfortran/ChangeLog87
-rw-r--r--libgfortran/generated/all_l4.c8
-rw-r--r--libgfortran/generated/all_l8.c8
-rw-r--r--libgfortran/generated/any_l4.c8
-rw-r--r--libgfortran/generated/any_l8.c8
-rw-r--r--libgfortran/generated/count_4_l4.c8
-rw-r--r--libgfortran/generated/count_4_l8.c8
-rw-r--r--libgfortran/generated/count_8_l4.c8
-rw-r--r--libgfortran/generated/count_8_l8.c8
-rw-r--r--libgfortran/generated/cshift1_4.c10
-rw-r--r--libgfortran/generated/cshift1_8.c10
-rw-r--r--libgfortran/generated/eoshift1_4.c10
-rw-r--r--libgfortran/generated/eoshift1_8.c10
-rw-r--r--libgfortran/generated/eoshift3_4.c12
-rw-r--r--libgfortran/generated/eoshift3_8.c12
-rw-r--r--libgfortran/generated/in_pack_i4.c6
-rw-r--r--libgfortran/generated/in_pack_i8.c6
-rw-r--r--libgfortran/generated/in_unpack_i4.c6
-rw-r--r--libgfortran/generated/in_unpack_i8.c6
-rw-r--r--libgfortran/generated/maxloc0_4_i4.c5
-rw-r--r--libgfortran/generated/maxloc0_4_i8.c5
-rw-r--r--libgfortran/generated/maxloc0_4_r4.c5
-rw-r--r--libgfortran/generated/maxloc0_4_r8.c5
-rw-r--r--libgfortran/generated/maxloc0_8_i4.c5
-rw-r--r--libgfortran/generated/maxloc0_8_i8.c5
-rw-r--r--libgfortran/generated/maxloc0_8_r4.c5
-rw-r--r--libgfortran/generated/maxloc0_8_r8.c5
-rw-r--r--libgfortran/generated/maxloc1_4_i4.c24
-rw-r--r--libgfortran/generated/maxloc1_4_i8.c24
-rw-r--r--libgfortran/generated/maxloc1_4_r4.c24
-rw-r--r--libgfortran/generated/maxloc1_4_r8.c24
-rw-r--r--libgfortran/generated/maxloc1_8_i4.c24
-rw-r--r--libgfortran/generated/maxloc1_8_i8.c24
-rw-r--r--libgfortran/generated/maxloc1_8_r4.c24
-rw-r--r--libgfortran/generated/maxloc1_8_r8.c24
-rw-r--r--libgfortran/generated/maxval_i4.c24
-rw-r--r--libgfortran/generated/maxval_i8.c24
-rw-r--r--libgfortran/generated/maxval_r4.c24
-rw-r--r--libgfortran/generated/maxval_r8.c24
-rw-r--r--libgfortran/generated/minloc0_4_i4.c7
-rw-r--r--libgfortran/generated/minloc0_4_i8.c5
-rw-r--r--libgfortran/generated/minloc0_4_r4.c5
-rw-r--r--libgfortran/generated/minloc0_4_r8.c5
-rw-r--r--libgfortran/generated/minloc0_8_i4.c5
-rw-r--r--libgfortran/generated/minloc0_8_i8.c5
-rw-r--r--libgfortran/generated/minloc0_8_r4.c5
-rw-r--r--libgfortran/generated/minloc0_8_r8.c5
-rw-r--r--libgfortran/generated/minloc1_4_i4.c24
-rw-r--r--libgfortran/generated/minloc1_4_i8.c24
-rw-r--r--libgfortran/generated/minloc1_4_r4.c24
-rw-r--r--libgfortran/generated/minloc1_4_r8.c24
-rw-r--r--libgfortran/generated/minloc1_8_i4.c24
-rw-r--r--libgfortran/generated/minloc1_8_i8.c24
-rw-r--r--libgfortran/generated/minloc1_8_r4.c24
-rw-r--r--libgfortran/generated/minloc1_8_r8.c24
-rw-r--r--libgfortran/generated/minval_i4.c24
-rw-r--r--libgfortran/generated/minval_i8.c24
-rw-r--r--libgfortran/generated/minval_r4.c24
-rw-r--r--libgfortran/generated/minval_r8.c24
-rw-r--r--libgfortran/generated/product_c4.c24
-rw-r--r--libgfortran/generated/product_c8.c24
-rw-r--r--libgfortran/generated/product_i4.c24
-rw-r--r--libgfortran/generated/product_i8.c24
-rw-r--r--libgfortran/generated/product_r4.c24
-rw-r--r--libgfortran/generated/product_r8.c24
-rw-r--r--libgfortran/generated/sum_c4.c24
-rw-r--r--libgfortran/generated/sum_c8.c24
-rw-r--r--libgfortran/generated/sum_i4.c24
-rw-r--r--libgfortran/generated/sum_i8.c24
-rw-r--r--libgfortran/generated/sum_r4.c24
-rw-r--r--libgfortran/generated/sum_r8.c24
-rw-r--r--libgfortran/intrinsics/cshift0.c8
-rw-r--r--libgfortran/intrinsics/eoshift0.c8
-rw-r--r--libgfortran/intrinsics/eoshift2.c10
-rw-r--r--libgfortran/intrinsics/random.c24
-rw-r--r--libgfortran/intrinsics/spread_generic.c8
-rw-r--r--libgfortran/intrinsics/stat.c8
-rw-r--r--libgfortran/m4/cshift1.m410
-rw-r--r--libgfortran/m4/eoshift1.m410
-rw-r--r--libgfortran/m4/eoshift3.m412
-rw-r--r--libgfortran/m4/ifunction.m418
-rw-r--r--libgfortran/m4/in_pack.m46
-rw-r--r--libgfortran/m4/in_unpack.m46
85 files changed, 865 insertions, 465 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dca689649035..7058ed25f797 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 000000000000..aa6286689c3c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/in_pack_rank7.f90
@@ -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
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index fe1ebfe7bdb4..3e0b3613c5d3 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -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
diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c
index 84062e623278..2b070bbb30b4 100644
--- a/libgfortran/generated/all_l4.c
+++ b/libgfortran/generated/all_l4.c
@@ -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;
diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c
index bc8e50050a19..29f4e2653acf 100644
--- a/libgfortran/generated/all_l8.c
+++ b/libgfortran/generated/all_l8.c
@@ -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;
diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c
index 82166911db74..0dfbc7ae4d5f 100644
--- a/libgfortran/generated/any_l4.c
+++ b/libgfortran/generated/any_l4.c
@@ -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;
diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c
index 3c3a3747fdfc..94e4e27c67fc 100644
--- a/libgfortran/generated/any_l8.c
+++ b/libgfortran/generated/any_l8.c
@@ -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;
diff --git a/libgfortran/generated/count_4_l4.c b/libgfortran/generated/count_4_l4.c
index 814dbd431993..3f43cc14e804 100644
--- a/libgfortran/generated/count_4_l4.c
+++ b/libgfortran/generated/count_4_l4.c
@@ -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;
diff --git a/libgfortran/generated/count_4_l8.c b/libgfortran/generated/count_4_l8.c
index cffbef6ddb97..e8da4ef8179b 100644
--- a/libgfortran/generated/count_4_l8.c
+++ b/libgfortran/generated/count_4_l8.c
@@ -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;
diff --git a/libgfortran/generated/count_8_l4.c b/libgfortran/generated/count_8_l4.c
index d1705bbee706..fe4c88663eb1 100644
--- a/libgfortran/generated/count_8_l4.c
+++ b/libgfortran/generated/count_8_l4.c
@@ -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;
diff --git a/libgfortran/generated/count_8_l8.c b/libgfortran/generated/count_8_l8.c
index 431b11e24823..0bcfdb83d523 100644
--- a/libgfortran/generated/count_8_l8.c
+++ b/libgfortran/generated/count_8_l8.c
@@ -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;
diff --git a/libgfortran/generated/cshift1_4.c b/libgfortran/generated/cshift1_4.c
index b8c8ab375b1f..683ce703ff2b 100644
--- a/libgfortran/generated/cshift1_4.c
+++ b/libgfortran/generated/cshift1_4.c
@@ -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;
diff --git a/libgfortran/generated/cshift1_8.c b/libgfortran/generated/cshift1_8.c
index e18539147b5f..6513b9103044 100644
--- a/libgfortran/generated/cshift1_8.c
+++ b/libgfortran/generated/cshift1_8.c
@@ -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;
diff --git a/libgfortran/generated/eoshift1_4.c b/libgfortran/generated/eoshift1_4.c
index 9c63a5cf6881..6c2ad301728f 100644
--- a/libgfortran/generated/eoshift1_4.c
+++ b/libgfortran/generated/eoshift1_4.c
@@ -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;
diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c
index 3c70c9a1e60e..c1d99c3de154 100644
--- a/libgfortran/generated/eoshift1_8.c
+++ b/libgfortran/generated/eoshift1_8.c
@@ -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;
diff --git a/libgfortran/generated/eoshift3_4.c b/libgfortran/generated/eoshift3_4.c
index 8f7913ea76a2..088cfbeba498 100644
--- a/libgfortran/generated/eoshift3_4.c
+++ b/libgfortran/generated/eoshift3_4.c
@@ -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;
diff --git a/libgfortran/generated/eoshift3_8.c b/libgfortran/generated/eoshift3_8.c
index 4c2e1d5539c6..302b159c0c85 100644
--- a/libgfortran/generated/eoshift3_8.c
+++ b/libgfortran/generated/eoshift3_8.c
@@ -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;
diff --git a/libgfortran/generated/in_pack_i4.c b/libgfortran/generated/in_pack_i4.c
index ac0c34d2b514..72a1519b299a 100644
--- a/libgfortran/generated/in_pack_i4.c
+++ b/libgfortran/generated/in_pack_i4.c
@@ -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;
diff --git a/libgfortran/generated/in_pack_i8.c b/libgfortran/generated/in_pack_i8.c
index 85ee82214452..51c6986a2886 100644
--- a/libgfortran/generated/in_pack_i8.c
+++ b/libgfortran/generated/in_pack_i8.c
@@ -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;
diff --git a/libgfortran/generated/in_unpack_i4.c b/libgfortran/generated/in_unpack_i4.c
index 87861006ef3e..92561a21d7e7 100644
--- a/libgfortran/generated/in_unpack_i4.c
+++ b/libgfortran/generated/in_unpack_i4.c
@@ -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;
diff --git a/libgfortran/generated/in_unpack_i8.c b/libgfortran/generated/in_unpack_i8.c
index a1686c3fd7a2..1f3e6a23dd36 100644
--- a/libgfortran/generated/in_unpack_i8.c
+++ b/libgfortran/generated/in_unpack_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c
index 94e2ec554bfb..1839bdf69498 100644
--- a/libgfortran/generated/maxloc0_4_i4.c
+++ b/libgfortran/generated/maxloc0_4_i4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c
index 85e0ea5c73e4..51aecb933273 100644
--- a/libgfortran/generated/maxloc0_4_i8.c
+++ b/libgfortran/generated/maxloc0_4_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c
index 14f64e4d9bf0..53fd0dc81d2c 100644
--- a/libgfortran/generated/maxloc0_4_r4.c
+++ b/libgfortran/generated/maxloc0_4_r4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c
index caa3388e490f..612c8f6b2fc8 100644
--- a/libgfortran/generated/maxloc0_4_r8.c
+++ b/libgfortran/generated/maxloc0_4_r8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c
index 6999ffab0f5e..c496e130217e 100644
--- a/libgfortran/generated/maxloc0_8_i4.c
+++ b/libgfortran/generated/maxloc0_8_i4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c
index 614e6dfcd4f5..1732564b84d6 100644
--- a/libgfortran/generated/maxloc0_8_i8.c
+++ b/libgfortran/generated/maxloc0_8_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c
index b9e19501572d..96f47474f0fc 100644
--- a/libgfortran/generated/maxloc0_8_r4.c
+++ b/libgfortran/generated/maxloc0_8_r4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c
index b7e216b8452a..36b3fcf9a85a 100644
--- a/libgfortran/generated/maxloc0_8_r8.c
+++ b/libgfortran/generated/maxloc0_8_r8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c
index deeb06382e0e..45e143f2008d 100644
--- a/libgfortran/generated/maxloc1_4_i4.c
+++ b/libgfortran/generated/maxloc1_4_i4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c
index 80555e817f82..e196f9352565 100644
--- a/libgfortran/generated/maxloc1_4_i8.c
+++ b/libgfortran/generated/maxloc1_4_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c
index 55d52291a9b9..cabd0c7faa93 100644
--- a/libgfortran/generated/maxloc1_4_r4.c
+++ b/libgfortran/generated/maxloc1_4_r4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c
index aab24a168340..44c38b861d1d 100644
--- a/libgfortran/generated/maxloc1_4_r8.c
+++ b/libgfortran/generated/maxloc1_4_r8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c
index 807be639840e..e05a8a2f46e9 100644
--- a/libgfortran/generated/maxloc1_8_i4.c
+++ b/libgfortran/generated/maxloc1_8_i4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c
index e86cd089031a..e2bf61c5c919 100644
--- a/libgfortran/generated/maxloc1_8_i8.c
+++ b/libgfortran/generated/maxloc1_8_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c
index 584bfb4a6116..acce8bcb1601 100644
--- a/libgfortran/generated/maxloc1_8_r4.c
+++ b/libgfortran/generated/maxloc1_8_r4.c
@@ -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;
diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c
index 60c8c3d3ce62..f3487226a3da 100644
--- a/libgfortran/generated/maxloc1_8_r8.c
+++ b/libgfortran/generated/maxloc1_8_r8.c
@@ -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;
diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c
index 0bf088f044ec..bf9d71219bf3 100644
--- a/libgfortran/generated/maxval_i4.c
+++ b/libgfortran/generated/maxval_i4.c
@@ -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;
diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c
index 2acdef9b09e0..175b7f3c4886 100644
--- a/libgfortran/generated/maxval_i8.c
+++ b/libgfortran/generated/maxval_i8.c
@@ -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;
diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c
index 46948b960907..fc86f69d0f60 100644
--- a/libgfortran/generated/maxval_r4.c
+++ b/libgfortran/generated/maxval_r4.c
@@ -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;
diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c
index b7bb89ce42c0..3d1a1cf89cb2 100644
--- a/libgfortran/generated/maxval_r8.c
+++ b/libgfortran/generated/maxval_r8.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c
index 4bb7a5a058d2..8f2dd235b5f6 100644
--- a/libgfortran/generated/minloc0_4_i4.c
+++ b/libgfortran/generated/minloc0_4_i4.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c
index 9d7a1a4c599e..0a50caaf7776 100644
--- a/libgfortran/generated/minloc0_4_i8.c
+++ b/libgfortran/generated/minloc0_4_i8.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c
index 3b54a3ba35aa..59809d777ea5 100644
--- a/libgfortran/generated/minloc0_4_r4.c
+++ b/libgfortran/generated/minloc0_4_r4.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c
index 9866538a54cf..69d1cdb0422b 100644
--- a/libgfortran/generated/minloc0_4_r8.c
+++ b/libgfortran/generated/minloc0_4_r8.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c
index 4440a9b5306b..c8989fc56bb4 100644
--- a/libgfortran/generated/minloc0_8_i4.c
+++ b/libgfortran/generated/minloc0_8_i4.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c
index f2ee93ca5441..8f1aa2441bbd 100644
--- a/libgfortran/generated/minloc0_8_i8.c
+++ b/libgfortran/generated/minloc0_8_i8.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c
index 1f38c912aa66..4407ddfd8c94 100644
--- a/libgfortran/generated/minloc0_8_r4.c
+++ b/libgfortran/generated/minloc0_8_r4.c
@@ -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;
diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c
index 773ab48ee29e..468322317ebc 100644
--- a/libgfortran/generated/minloc0_8_r8.c
+++ b/libgfortran/generated/minloc0_8_r8.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c
index 8c99d8391b2a..04fadb6481fb 100644
--- a/libgfortran/generated/minloc1_4_i4.c
+++ b/libgfortran/generated/minloc1_4_i4.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c
index 48596a610013..b2922c8db5f4 100644
--- a/libgfortran/generated/minloc1_4_i8.c
+++ b/libgfortran/generated/minloc1_4_i8.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c
index 0b9d15c1fa8d..efec5850daeb 100644
--- a/libgfortran/generated/minloc1_4_r4.c
+++ b/libgfortran/generated/minloc1_4_r4.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c
index 25d366a94394..95bc2a6ae066 100644
--- a/libgfortran/generated/minloc1_4_r8.c
+++ b/libgfortran/generated/minloc1_4_r8.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c
index a57efe6ffc76..11b1f7118ac8 100644
--- a/libgfortran/generated/minloc1_8_i4.c
+++ b/libgfortran/generated/minloc1_8_i4.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c
index 5e1603a3a1b3..4235bdec2dcb 100644
--- a/libgfortran/generated/minloc1_8_i8.c
+++ b/libgfortran/generated/minloc1_8_i8.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c
index 643765a48813..a679a65a1959 100644
--- a/libgfortran/generated/minloc1_8_r4.c
+++ b/libgfortran/generated/minloc1_8_r4.c
@@ -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;
diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c
index 7d2dc4175a62..177ba6d4a98c 100644
--- a/libgfortran/generated/minloc1_8_r8.c
+++ b/libgfortran/generated/minloc1_8_r8.c
@@ -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;
diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c
index d0a8a5ea4ad7..097419697be2 100644
--- a/libgfortran/generated/minval_i4.c
+++ b/libgfortran/generated/minval_i4.c
@@ -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;
diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c
index 9d44514c4c61..a969bfdc8801 100644
--- a/libgfortran/generated/minval_i8.c
+++ b/libgfortran/generated/minval_i8.c
@@ -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;
diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c
index 4220d8755ebd..fe1a22421852 100644
--- a/libgfortran/generated/minval_r4.c
+++ b/libgfortran/generated/minval_r4.c
@@ -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;
diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c
index d6c5b000eea1..050b3c9dfebd 100644
--- a/libgfortran/generated/minval_r8.c
+++ b/libgfortran/generated/minval_r8.c
@@ -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;
diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c
index d20ad9b8440a..2cee7978ebcf 100644
--- a/libgfortran/generated/product_c4.c
+++ b/libgfortran/generated/product_c4.c
@@ -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;
diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c
index 706e9737de8f..6eaeb7a90f41 100644
--- a/libgfortran/generated/product_c8.c
+++ b/libgfortran/generated/product_c8.c
@@ -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;
diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c
index f8f86d6ca82d..0a58d04dcca2 100644
--- a/libgfortran/generated/product_i4.c
+++ b/libgfortran/generated/product_i4.c
@@ -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;
diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c
index 00ae28bd1bf6..1e61c52c8d49 100644
--- a/libgfortran/generated/product_i8.c
+++ b/libgfortran/generated/product_i8.c
@@ -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;
diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c
index ea377bbdcbbd..586c80c1d2f4 100644
--- a/libgfortran/generated/product_r4.c
+++ b/libgfortran/generated/product_r4.c
@@ -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;
diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c
index 58d22cfb5bea..3be015136e9d 100644
--- a/libgfortran/generated/product_r8.c
+++ b/libgfortran/generated/product_r8.c
@@ -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;
diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c
index d9b36d8201f9..89b32f03985e 100644
--- a/libgfortran/generated/sum_c4.c
+++ b/libgfortran/generated/sum_c4.c
@@ -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;
diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c
index a5c44cdcf038..c7674ebfe723 100644
--- a/libgfortran/generated/sum_c8.c
+++ b/libgfortran/generated/sum_c8.c
@@ -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;
diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c
index b10798f847c0..76106bf8110f 100644
--- a/libgfortran/generated/sum_i4.c
+++ b/libgfortran/generated/sum_i4.c
@@ -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;
diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c
index 0d3e1913ac44..16d04116c855 100644
--- a/libgfortran/generated/sum_i8.c
+++ b/libgfortran/generated/sum_i8.c
@@ -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;
diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c
index c0a81d5cb0a1..c9b36cd07f81 100644
--- a/libgfortran/generated/sum_r4.c
+++ b/libgfortran/generated/sum_r4.c
@@ -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;
diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c
index 190cabbc22d8..a4d260595f09 100644
--- a/libgfortran/generated/sum_r8.c
+++ b/libgfortran/generated/sum_r8.c
@@ -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;
diff --git a/libgfortran/intrinsics/cshift0.c b/libgfortran/intrinsics/cshift0.c
index 2dd6a022e8a6..61fd9016c9c8 100644
--- a/libgfortran/intrinsics/cshift0.c
+++ b/libgfortran/intrinsics/cshift0.c
@@ -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;
diff --git a/libgfortran/intrinsics/eoshift0.c b/libgfortran/intrinsics/eoshift0.c
index 26874e12309f..5db3737c3556 100644
--- a/libgfortran/intrinsics/eoshift0.c
+++ b/libgfortran/intrinsics/eoshift0.c
@@ -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;
diff --git a/libgfortran/intrinsics/eoshift2.c b/libgfortran/intrinsics/eoshift2.c
index 30bb3dd4864b..8d22dbef7428 100644
--- a/libgfortran/intrinsics/eoshift2.c
+++ b/libgfortran/intrinsics/eoshift2.c
@@ -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;
diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c
index fdb99cc040ef..7607bb15b03a 100644
--- a/libgfortran/intrinsics/random.c
+++ b/libgfortran/intrinsics/random.c
@@ -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;
diff --git a/libgfortran/intrinsics/spread_generic.c b/libgfortran/intrinsics/spread_generic.c
index 7dcabf63bcbe..8d39d30d318b 100644
--- a/libgfortran/intrinsics/spread_generic.c
+++ b/libgfortran/intrinsics/spread_generic.c
@@ -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;
diff --git a/libgfortran/intrinsics/stat.c b/libgfortran/intrinsics/stat.c
index d7ed7610bb08..df76f3f97627 100644
--- a/libgfortran/intrinsics/stat.c
+++ b/libgfortran/intrinsics/stat.c
@@ -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)
diff --git a/libgfortran/m4/cshift1.m4 b/libgfortran/m4/cshift1.m4
index 7288c35f934c..308c3dc40f81 100644
--- a/libgfortran/m4/cshift1.m4
+++ b/libgfortran/m4/cshift1.m4
@@ -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;
diff --git a/libgfortran/m4/eoshift1.m4 b/libgfortran/m4/eoshift1.m4
index 898f778c9e74..9cf6fa9a84a3 100644
--- a/libgfortran/m4/eoshift1.m4
+++ b/libgfortran/m4/eoshift1.m4
@@ -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;
diff --git a/libgfortran/m4/eoshift3.m4 b/libgfortran/m4/eoshift3.m4
index a94f572b3b3d..89dcb3fcff8e 100644
--- a/libgfortran/m4/eoshift3.m4
+++ b/libgfortran/m4/eoshift3.m4
@@ -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;
diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4
index 82a74ef80b44..7da24108d8b7 100644
--- a/libgfortran/m4/ifunction.m4
+++ b/libgfortran/m4/ifunction.m4
@@ -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;
diff --git a/libgfortran/m4/in_pack.m4 b/libgfortran/m4/in_pack.m4
index 9d05b5df8cce..b2eac40581fe 100644
--- a/libgfortran/m4/in_pack.m4
+++ b/libgfortran/m4/in_pack.m4
@@ -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;
diff --git a/libgfortran/m4/in_unpack.m4 b/libgfortran/m4/in_unpack.m4
index d2f74bde9ecd..ea9ccc89f76b 100644
--- a/libgfortran/m4/in_unpack.m4
+++ b/libgfortran/m4/in_unpack.m4
@@ -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;