summaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxval_i8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxval_i8.c')
-rw-r--r--libgfortran/generated/maxval_i8.c24
1 files changed, 15 insertions, 9 deletions
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;