summaryrefslogtreecommitdiffstats
path: root/libgfortran/generated/maxloc1_8_r8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxloc1_8_r8.c')
-rw-r--r--libgfortran/generated/maxloc1_8_r8.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c
index 60c8c3d3ce6..f3487226a3d 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;
OpenPOWER on IntegriCloud