summaryrefslogtreecommitdiffstats
path: root/libgfortran/generated
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated')
-rw-r--r--libgfortran/generated/maxloc0_16_i16.c52
-rw-r--r--libgfortran/generated/maxloc0_16_i4.c52
-rw-r--r--libgfortran/generated/maxloc0_16_i8.c52
-rw-r--r--libgfortran/generated/maxloc0_16_r10.c52
-rw-r--r--libgfortran/generated/maxloc0_16_r16.c52
-rw-r--r--libgfortran/generated/maxloc0_16_r4.c52
-rw-r--r--libgfortran/generated/maxloc0_16_r8.c52
-rw-r--r--libgfortran/generated/maxloc0_4_i16.c52
-rw-r--r--libgfortran/generated/maxloc0_4_i4.c52
-rw-r--r--libgfortran/generated/maxloc0_4_i8.c52
-rw-r--r--libgfortran/generated/maxloc0_4_r10.c52
-rw-r--r--libgfortran/generated/maxloc0_4_r16.c52
-rw-r--r--libgfortran/generated/maxloc0_4_r4.c52
-rw-r--r--libgfortran/generated/maxloc0_4_r8.c52
-rw-r--r--libgfortran/generated/maxloc0_8_i16.c52
-rw-r--r--libgfortran/generated/maxloc0_8_i4.c52
-rw-r--r--libgfortran/generated/maxloc0_8_i8.c52
-rw-r--r--libgfortran/generated/maxloc0_8_r10.c52
-rw-r--r--libgfortran/generated/maxloc0_8_r16.c52
-rw-r--r--libgfortran/generated/maxloc0_8_r4.c52
-rw-r--r--libgfortran/generated/maxloc0_8_r8.c52
-rw-r--r--libgfortran/generated/maxloc1_16_i16.c54
-rw-r--r--libgfortran/generated/maxloc1_16_i4.c54
-rw-r--r--libgfortran/generated/maxloc1_16_i8.c54
-rw-r--r--libgfortran/generated/maxloc1_16_r10.c54
-rw-r--r--libgfortran/generated/maxloc1_16_r16.c54
-rw-r--r--libgfortran/generated/maxloc1_16_r4.c54
-rw-r--r--libgfortran/generated/maxloc1_16_r8.c54
-rw-r--r--libgfortran/generated/maxloc1_4_i16.c54
-rw-r--r--libgfortran/generated/maxloc1_4_i4.c54
-rw-r--r--libgfortran/generated/maxloc1_4_i8.c54
-rw-r--r--libgfortran/generated/maxloc1_4_r10.c54
-rw-r--r--libgfortran/generated/maxloc1_4_r16.c54
-rw-r--r--libgfortran/generated/maxloc1_4_r4.c54
-rw-r--r--libgfortran/generated/maxloc1_4_r8.c54
-rw-r--r--libgfortran/generated/maxloc1_8_i16.c54
-rw-r--r--libgfortran/generated/maxloc1_8_i4.c54
-rw-r--r--libgfortran/generated/maxloc1_8_i8.c54
-rw-r--r--libgfortran/generated/maxloc1_8_r10.c54
-rw-r--r--libgfortran/generated/maxloc1_8_r16.c54
-rw-r--r--libgfortran/generated/maxloc1_8_r4.c54
-rw-r--r--libgfortran/generated/maxloc1_8_r8.c54
-rw-r--r--libgfortran/generated/maxval_i16.c54
-rw-r--r--libgfortran/generated/maxval_i4.c54
-rw-r--r--libgfortran/generated/maxval_i8.c54
-rw-r--r--libgfortran/generated/maxval_r10.c54
-rw-r--r--libgfortran/generated/maxval_r16.c54
-rw-r--r--libgfortran/generated/maxval_r4.c54
-rw-r--r--libgfortran/generated/maxval_r8.c54
-rw-r--r--libgfortran/generated/minloc0_16_i16.c52
-rw-r--r--libgfortran/generated/minloc0_16_i4.c52
-rw-r--r--libgfortran/generated/minloc0_16_i8.c52
-rw-r--r--libgfortran/generated/minloc0_16_r10.c52
-rw-r--r--libgfortran/generated/minloc0_16_r16.c52
-rw-r--r--libgfortran/generated/minloc0_16_r4.c52
-rw-r--r--libgfortran/generated/minloc0_16_r8.c52
-rw-r--r--libgfortran/generated/minloc0_4_i16.c52
-rw-r--r--libgfortran/generated/minloc0_4_i4.c52
-rw-r--r--libgfortran/generated/minloc0_4_i8.c52
-rw-r--r--libgfortran/generated/minloc0_4_r10.c52
-rw-r--r--libgfortran/generated/minloc0_4_r16.c52
-rw-r--r--libgfortran/generated/minloc0_4_r4.c52
-rw-r--r--libgfortran/generated/minloc0_4_r8.c52
-rw-r--r--libgfortran/generated/minloc0_8_i16.c52
-rw-r--r--libgfortran/generated/minloc0_8_i4.c52
-rw-r--r--libgfortran/generated/minloc0_8_i8.c52
-rw-r--r--libgfortran/generated/minloc0_8_r10.c52
-rw-r--r--libgfortran/generated/minloc0_8_r16.c52
-rw-r--r--libgfortran/generated/minloc0_8_r4.c52
-rw-r--r--libgfortran/generated/minloc0_8_r8.c52
-rw-r--r--libgfortran/generated/minloc1_16_i16.c54
-rw-r--r--libgfortran/generated/minloc1_16_i4.c54
-rw-r--r--libgfortran/generated/minloc1_16_i8.c54
-rw-r--r--libgfortran/generated/minloc1_16_r10.c54
-rw-r--r--libgfortran/generated/minloc1_16_r16.c54
-rw-r--r--libgfortran/generated/minloc1_16_r4.c54
-rw-r--r--libgfortran/generated/minloc1_16_r8.c54
-rw-r--r--libgfortran/generated/minloc1_4_i16.c54
-rw-r--r--libgfortran/generated/minloc1_4_i4.c54
-rw-r--r--libgfortran/generated/minloc1_4_i8.c54
-rw-r--r--libgfortran/generated/minloc1_4_r10.c54
-rw-r--r--libgfortran/generated/minloc1_4_r16.c54
-rw-r--r--libgfortran/generated/minloc1_4_r4.c54
-rw-r--r--libgfortran/generated/minloc1_4_r8.c54
-rw-r--r--libgfortran/generated/minloc1_8_i16.c54
-rw-r--r--libgfortran/generated/minloc1_8_i4.c54
-rw-r--r--libgfortran/generated/minloc1_8_i8.c54
-rw-r--r--libgfortran/generated/minloc1_8_r10.c54
-rw-r--r--libgfortran/generated/minloc1_8_r16.c54
-rw-r--r--libgfortran/generated/minloc1_8_r4.c54
-rw-r--r--libgfortran/generated/minloc1_8_r8.c54
-rw-r--r--libgfortran/generated/minval_i16.c54
-rw-r--r--libgfortran/generated/minval_i4.c54
-rw-r--r--libgfortran/generated/minval_i8.c54
-rw-r--r--libgfortran/generated/minval_r10.c54
-rw-r--r--libgfortran/generated/minval_r16.c54
-rw-r--r--libgfortran/generated/minval_r4.c54
-rw-r--r--libgfortran/generated/minval_r8.c54
-rw-r--r--libgfortran/generated/product_c10.c54
-rw-r--r--libgfortran/generated/product_c16.c54
-rw-r--r--libgfortran/generated/product_c4.c54
-rw-r--r--libgfortran/generated/product_c8.c54
-rw-r--r--libgfortran/generated/product_i16.c54
-rw-r--r--libgfortran/generated/product_i4.c54
-rw-r--r--libgfortran/generated/product_i8.c54
-rw-r--r--libgfortran/generated/product_r10.c54
-rw-r--r--libgfortran/generated/product_r16.c54
-rw-r--r--libgfortran/generated/product_r4.c54
-rw-r--r--libgfortran/generated/product_r8.c54
-rw-r--r--libgfortran/generated/sum_c10.c54
-rw-r--r--libgfortran/generated/sum_c16.c54
-rw-r--r--libgfortran/generated/sum_c4.c54
-rw-r--r--libgfortran/generated/sum_c8.c54
-rw-r--r--libgfortran/generated/sum_i16.c54
-rw-r--r--libgfortran/generated/sum_i4.c54
-rw-r--r--libgfortran/generated/sum_i8.c54
-rw-r--r--libgfortran/generated/sum_r10.c54
-rw-r--r--libgfortran/generated/sum_r16.c54
-rw-r--r--libgfortran/generated/sum_r4.c54
-rw-r--r--libgfortran/generated/sum_r8.c54
120 files changed, 6396 insertions, 0 deletions
diff --git a/libgfortran/generated/maxloc0_16_i16.c b/libgfortran/generated/maxloc0_16_i16.c
index 93ad9e4ebd1..ab341d8bea9 100644
--- a/libgfortran/generated/maxloc0_16_i16.c
+++ b/libgfortran/generated/maxloc0_16_i16.c
@@ -293,4 +293,56 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_i16);
+
+void
+smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_i4.c b/libgfortran/generated/maxloc0_16_i4.c
index 6808f693f29..51bee3154f6 100644
--- a/libgfortran/generated/maxloc0_16_i4.c
+++ b/libgfortran/generated/maxloc0_16_i4.c
@@ -293,4 +293,56 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_i4 (gfc_array_i16 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_i4);
+
+void
+smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_i8.c b/libgfortran/generated/maxloc0_16_i8.c
index ed3061add6f..dd8fb46a83a 100644
--- a/libgfortran/generated/maxloc0_16_i8.c
+++ b/libgfortran/generated/maxloc0_16_i8.c
@@ -293,4 +293,56 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_i8 (gfc_array_i16 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_i8);
+
+void
+smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_r10.c b/libgfortran/generated/maxloc0_16_r10.c
index e427ba50ef2..793885da8d7 100644
--- a/libgfortran/generated/maxloc0_16_r10.c
+++ b/libgfortran/generated/maxloc0_16_r10.c
@@ -293,4 +293,56 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_r10 (gfc_array_i16 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_r10);
+
+void
+smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_r16.c b/libgfortran/generated/maxloc0_16_r16.c
index b457997aedd..e3d0c7ff9c1 100644
--- a/libgfortran/generated/maxloc0_16_r16.c
+++ b/libgfortran/generated/maxloc0_16_r16.c
@@ -293,4 +293,56 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_r16 (gfc_array_i16 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_r16);
+
+void
+smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_r4.c b/libgfortran/generated/maxloc0_16_r4.c
index e9dbcbf9ce2..eedeaffda52 100644
--- a/libgfortran/generated/maxloc0_16_r4.c
+++ b/libgfortran/generated/maxloc0_16_r4.c
@@ -293,4 +293,56 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_r4 (gfc_array_i16 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_r4);
+
+void
+smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_16_r8.c b/libgfortran/generated/maxloc0_16_r8.c
index 07d7aef11f5..0e93c2a4d8e 100644
--- a/libgfortran/generated/maxloc0_16_r8.c
+++ b/libgfortran/generated/maxloc0_16_r8.c
@@ -293,4 +293,56 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc0_16_r8 (gfc_array_i16 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_16_r8);
+
+void
+smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc0_16_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_i16.c b/libgfortran/generated/maxloc0_4_i16.c
index 08f31808129..01d78701964 100644
--- a/libgfortran/generated/maxloc0_4_i16.c
+++ b/libgfortran/generated/maxloc0_4_i16.c
@@ -293,4 +293,56 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_i16 (gfc_array_i4 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_i16);
+
+void
+smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c
index 9c342d90b82..7b1260c7e96 100644
--- a/libgfortran/generated/maxloc0_4_i4.c
+++ b/libgfortran/generated/maxloc0_4_i4.c
@@ -293,4 +293,56 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_i4);
+
+void
+smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c
index 9e3d66b872f..18b81c6a652 100644
--- a/libgfortran/generated/maxloc0_4_i8.c
+++ b/libgfortran/generated/maxloc0_4_i8.c
@@ -293,4 +293,56 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_i8 (gfc_array_i4 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_i8);
+
+void
+smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_r10.c b/libgfortran/generated/maxloc0_4_r10.c
index c44fedd6aa3..59e521c2421 100644
--- a/libgfortran/generated/maxloc0_4_r10.c
+++ b/libgfortran/generated/maxloc0_4_r10.c
@@ -293,4 +293,56 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_r10 (gfc_array_i4 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_r10);
+
+void
+smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_r16.c b/libgfortran/generated/maxloc0_4_r16.c
index e5ff44fe4a0..18bf738889f 100644
--- a/libgfortran/generated/maxloc0_4_r16.c
+++ b/libgfortran/generated/maxloc0_4_r16.c
@@ -293,4 +293,56 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_r16 (gfc_array_i4 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_r16);
+
+void
+smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c
index f5dba470153..daa379c72d3 100644
--- a/libgfortran/generated/maxloc0_4_r4.c
+++ b/libgfortran/generated/maxloc0_4_r4.c
@@ -293,4 +293,56 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_r4 (gfc_array_i4 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_r4);
+
+void
+smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c
index a82cedad3d3..063fed03fac 100644
--- a/libgfortran/generated/maxloc0_4_r8.c
+++ b/libgfortran/generated/maxloc0_4_r8.c
@@ -293,4 +293,56 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc0_4_r8 (gfc_array_i4 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_4_r8);
+
+void
+smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc0_4_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_i16.c b/libgfortran/generated/maxloc0_8_i16.c
index 35fd1f7cac7..1e1dbf25049 100644
--- a/libgfortran/generated/maxloc0_8_i16.c
+++ b/libgfortran/generated/maxloc0_8_i16.c
@@ -293,4 +293,56 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_i16 (gfc_array_i8 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_i16);
+
+void
+smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c
index 16320bdb307..2a08cd82de4 100644
--- a/libgfortran/generated/maxloc0_8_i4.c
+++ b/libgfortran/generated/maxloc0_8_i4.c
@@ -293,4 +293,56 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_i4 (gfc_array_i8 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_i4);
+
+void
+smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c
index 99ab4b940d8..b17a445e96f 100644
--- a/libgfortran/generated/maxloc0_8_i8.c
+++ b/libgfortran/generated/maxloc0_8_i8.c
@@ -293,4 +293,56 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_i8);
+
+void
+smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_r10.c b/libgfortran/generated/maxloc0_8_r10.c
index eaaff9f5451..63c1467c54a 100644
--- a/libgfortran/generated/maxloc0_8_r10.c
+++ b/libgfortran/generated/maxloc0_8_r10.c
@@ -293,4 +293,56 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_r10 (gfc_array_i8 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_r10);
+
+void
+smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_r16.c b/libgfortran/generated/maxloc0_8_r16.c
index e0d1a427e15..c1fe42a71b8 100644
--- a/libgfortran/generated/maxloc0_8_r16.c
+++ b/libgfortran/generated/maxloc0_8_r16.c
@@ -293,4 +293,56 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_r16 (gfc_array_i8 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_r16);
+
+void
+smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c
index 54047b5ed51..58de2ca0e46 100644
--- a/libgfortran/generated/maxloc0_8_r4.c
+++ b/libgfortran/generated/maxloc0_8_r4.c
@@ -293,4 +293,56 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_r4 (gfc_array_i8 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_r4);
+
+void
+smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c
index 820d3a7ec8f..e286a819897 100644
--- a/libgfortran/generated/maxloc0_8_r8.c
+++ b/libgfortran/generated/maxloc0_8_r8.c
@@ -293,4 +293,56 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc0_8_r8 (gfc_array_i8 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(smaxloc0_8_r8);
+
+void
+smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc0_8_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c
index 9595ac33d40..9f6408b111c 100644
--- a/libgfortran/generated/maxloc1_16_i16.c
+++ b/libgfortran/generated/maxloc1_16_i16.c
@@ -350,4 +350,58 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_i16);
+
+void
+smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c
index cd668bbd6ee..7810033dfd2 100644
--- a/libgfortran/generated/maxloc1_16_i4.c
+++ b/libgfortran/generated/maxloc1_16_i4.c
@@ -350,4 +350,58 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_i4 (gfc_array_i16 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_i4);
+
+void
+smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c
index ab665986b09..6c6a790a93c 100644
--- a/libgfortran/generated/maxloc1_16_i8.c
+++ b/libgfortran/generated/maxloc1_16_i8.c
@@ -350,4 +350,58 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_i8 (gfc_array_i16 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_i8);
+
+void
+smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c
index 90606dd86e1..d122223ff37 100644
--- a/libgfortran/generated/maxloc1_16_r10.c
+++ b/libgfortran/generated/maxloc1_16_r10.c
@@ -350,4 +350,58 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_r10 (gfc_array_i16 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_r10);
+
+void
+smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c
index 0a1939c9cde..18d12256049 100644
--- a/libgfortran/generated/maxloc1_16_r16.c
+++ b/libgfortran/generated/maxloc1_16_r16.c
@@ -350,4 +350,58 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_r16 (gfc_array_i16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_r16);
+
+void
+smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c
index 445e8b093b7..f5fbcac366f 100644
--- a/libgfortran/generated/maxloc1_16_r4.c
+++ b/libgfortran/generated/maxloc1_16_r4.c
@@ -350,4 +350,58 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_r4 (gfc_array_i16 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_r4);
+
+void
+smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c
index 3a663bb1094..40922e389e0 100644
--- a/libgfortran/generated/maxloc1_16_r8.c
+++ b/libgfortran/generated/maxloc1_16_r8.c
@@ -350,4 +350,58 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxloc1_16_r8 (gfc_array_i16 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_16_r8);
+
+void
+smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxloc1_16_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c
index b881504cbe0..1dfb06d9cde 100644
--- a/libgfortran/generated/maxloc1_4_i16.c
+++ b/libgfortran/generated/maxloc1_4_i16.c
@@ -350,4 +350,58 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_i16 (gfc_array_i4 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_i16);
+
+void
+smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c
index e8a053ec04a..ae016accbc2 100644
--- a/libgfortran/generated/maxloc1_4_i4.c
+++ b/libgfortran/generated/maxloc1_4_i4.c
@@ -350,4 +350,58 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_i4);
+
+void
+smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c
index ff5b7b9fe19..d55059bbe2a 100644
--- a/libgfortran/generated/maxloc1_4_i8.c
+++ b/libgfortran/generated/maxloc1_4_i8.c
@@ -350,4 +350,58 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_i8 (gfc_array_i4 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_i8);
+
+void
+smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c
index 306cfe98671..70a0b7b2b78 100644
--- a/libgfortran/generated/maxloc1_4_r10.c
+++ b/libgfortran/generated/maxloc1_4_r10.c
@@ -350,4 +350,58 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_r10 (gfc_array_i4 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_r10);
+
+void
+smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c
index 6f6cd22b27a..e3abb9c02ba 100644
--- a/libgfortran/generated/maxloc1_4_r16.c
+++ b/libgfortran/generated/maxloc1_4_r16.c
@@ -350,4 +350,58 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_r16 (gfc_array_i4 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_r16);
+
+void
+smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c
index 3795ed80d55..bcecc57d02e 100644
--- a/libgfortran/generated/maxloc1_4_r4.c
+++ b/libgfortran/generated/maxloc1_4_r4.c
@@ -350,4 +350,58 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_r4 (gfc_array_i4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_r4);
+
+void
+smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c
index 82d4a6710c9..5bcf032557d 100644
--- a/libgfortran/generated/maxloc1_4_r8.c
+++ b/libgfortran/generated/maxloc1_4_r8.c
@@ -350,4 +350,58 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxloc1_4_r8 (gfc_array_i4 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_4_r8);
+
+void
+smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxloc1_4_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c
index 69cb35ec5f9..8d5491a4b6d 100644
--- a/libgfortran/generated/maxloc1_8_i16.c
+++ b/libgfortran/generated/maxloc1_8_i16.c
@@ -350,4 +350,58 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_i16 (gfc_array_i8 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_i16);
+
+void
+smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c
index 6857896d5b5..5c187e25daa 100644
--- a/libgfortran/generated/maxloc1_8_i4.c
+++ b/libgfortran/generated/maxloc1_8_i4.c
@@ -350,4 +350,58 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_i4 (gfc_array_i8 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_i4);
+
+void
+smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c
index 5c5f8368b53..ea123178940 100644
--- a/libgfortran/generated/maxloc1_8_i8.c
+++ b/libgfortran/generated/maxloc1_8_i8.c
@@ -350,4 +350,58 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_i8);
+
+void
+smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c
index e4f17d49b8e..40972e64840 100644
--- a/libgfortran/generated/maxloc1_8_r10.c
+++ b/libgfortran/generated/maxloc1_8_r10.c
@@ -350,4 +350,58 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_r10 (gfc_array_i8 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_r10);
+
+void
+smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c
index 0a5dd515e9d..11f3e05aa75 100644
--- a/libgfortran/generated/maxloc1_8_r16.c
+++ b/libgfortran/generated/maxloc1_8_r16.c
@@ -350,4 +350,58 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_r16 (gfc_array_i8 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_r16);
+
+void
+smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c
index 15a82f24921..10bd416338e 100644
--- a/libgfortran/generated/maxloc1_8_r4.c
+++ b/libgfortran/generated/maxloc1_8_r4.c
@@ -350,4 +350,58 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_r4 (gfc_array_i8 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_r4);
+
+void
+smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c
index c89135e2f3a..534e6cd80d6 100644
--- a/libgfortran/generated/maxloc1_8_r8.c
+++ b/libgfortran/generated/maxloc1_8_r8.c
@@ -350,4 +350,58 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxloc1_8_r8 (gfc_array_i8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxloc1_8_r8);
+
+void
+smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxloc1_8_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c
index 9ae812ed7ea..2b505803daf 100644
--- a/libgfortran/generated/maxval_i16.c
+++ b/libgfortran/generated/maxval_i16.c
@@ -339,4 +339,58 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void smaxval_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_i16);
+
+void
+smaxval_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ maxval_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_INTEGER_16_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c
index 3ee7ce04edd..65136953239 100644
--- a/libgfortran/generated/maxval_i4.c
+++ b/libgfortran/generated/maxval_i4.c
@@ -339,4 +339,58 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void smaxval_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_i4);
+
+void
+smaxval_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ maxval_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_INTEGER_4_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c
index f2cf7fc908f..fe78be161a6 100644
--- a/libgfortran/generated/maxval_i8.c
+++ b/libgfortran/generated/maxval_i8.c
@@ -339,4 +339,58 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void smaxval_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_i8);
+
+void
+smaxval_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ maxval_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_INTEGER_8_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c
index 9efa92aac8d..5f9c5db89fe 100644
--- a/libgfortran/generated/maxval_r10.c
+++ b/libgfortran/generated/maxval_r10.c
@@ -339,4 +339,58 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray,
}
}
+
+extern void smaxval_r10 (gfc_array_r10 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_r10);
+
+void
+smaxval_r10 (gfc_array_r10 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_10 *dest;
+
+ if (*mask)
+ {
+ maxval_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_REAL_10_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c
index a4d27be7316..a52669164cc 100644
--- a/libgfortran/generated/maxval_r16.c
+++ b/libgfortran/generated/maxval_r16.c
@@ -339,4 +339,58 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
}
}
+
+extern void smaxval_r16 (gfc_array_r16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_r16);
+
+void
+smaxval_r16 (gfc_array_r16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_16 *dest;
+
+ if (*mask)
+ {
+ maxval_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_REAL_16_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c
index 42f95a18adb..23cee97d5e0 100644
--- a/libgfortran/generated/maxval_r4.c
+++ b/libgfortran/generated/maxval_r4.c
@@ -339,4 +339,58 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray,
}
}
+
+extern void smaxval_r4 (gfc_array_r4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_r4);
+
+void
+smaxval_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_4 *dest;
+
+ if (*mask)
+ {
+ maxval_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_REAL_4_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c
index f70442506dc..2fd37e5fa9b 100644
--- a/libgfortran/generated/maxval_r8.c
+++ b/libgfortran/generated/maxval_r8.c
@@ -339,4 +339,58 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray,
}
}
+
+extern void smaxval_r8 (gfc_array_r8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(smaxval_r8);
+
+void
+smaxval_r8 (gfc_array_r8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_8 *dest;
+
+ if (*mask)
+ {
+ maxval_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = -GFC_REAL_8_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc0_16_i16.c b/libgfortran/generated/minloc0_16_i16.c
index 7bf58e32789..d41276d9230 100644
--- a/libgfortran/generated/minloc0_16_i16.c
+++ b/libgfortran/generated/minloc0_16_i16.c
@@ -293,4 +293,56 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_i16);
+
+void
+sminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_i4.c b/libgfortran/generated/minloc0_16_i4.c
index b42205bd6b4..16e08638005 100644
--- a/libgfortran/generated/minloc0_16_i4.c
+++ b/libgfortran/generated/minloc0_16_i4.c
@@ -293,4 +293,56 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_i4 (gfc_array_i16 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_i4);
+
+void
+sminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_i8.c b/libgfortran/generated/minloc0_16_i8.c
index c687d10b716..bd2f08a56d1 100644
--- a/libgfortran/generated/minloc0_16_i8.c
+++ b/libgfortran/generated/minloc0_16_i8.c
@@ -293,4 +293,56 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_i8 (gfc_array_i16 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_i8);
+
+void
+sminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_r10.c b/libgfortran/generated/minloc0_16_r10.c
index 99ae91d7fc0..ab88d299975 100644
--- a/libgfortran/generated/minloc0_16_r10.c
+++ b/libgfortran/generated/minloc0_16_r10.c
@@ -293,4 +293,56 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_r10 (gfc_array_i16 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_r10);
+
+void
+sminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c
index d727f4c91e6..c71a24081aa 100644
--- a/libgfortran/generated/minloc0_16_r16.c
+++ b/libgfortran/generated/minloc0_16_r16.c
@@ -293,4 +293,56 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_r16 (gfc_array_i16 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_r16);
+
+void
+sminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_r4.c b/libgfortran/generated/minloc0_16_r4.c
index 501a668efd6..4cfa38934e9 100644
--- a/libgfortran/generated/minloc0_16_r4.c
+++ b/libgfortran/generated/minloc0_16_r4.c
@@ -293,4 +293,56 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_r4 (gfc_array_i16 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_r4);
+
+void
+sminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_16_r8.c b/libgfortran/generated/minloc0_16_r8.c
index 57783b6c174..52ef10b5867 100644
--- a/libgfortran/generated/minloc0_16_r8.c
+++ b/libgfortran/generated/minloc0_16_r8.c
@@ -293,4 +293,56 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc0_16_r8 (gfc_array_i16 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_16_r8);
+
+void
+sminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc0_16_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_i16.c b/libgfortran/generated/minloc0_4_i16.c
index b71fbaa286d..5486e93739d 100644
--- a/libgfortran/generated/minloc0_4_i16.c
+++ b/libgfortran/generated/minloc0_4_i16.c
@@ -293,4 +293,56 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_i16 (gfc_array_i4 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_i16);
+
+void
+sminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c
index c655b1ac713..519b10ecf3a 100644
--- a/libgfortran/generated/minloc0_4_i4.c
+++ b/libgfortran/generated/minloc0_4_i4.c
@@ -293,4 +293,56 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_i4);
+
+void
+sminloc0_4_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c
index 7f94829c47d..3988838666b 100644
--- a/libgfortran/generated/minloc0_4_i8.c
+++ b/libgfortran/generated/minloc0_4_i8.c
@@ -293,4 +293,56 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_i8 (gfc_array_i4 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_i8);
+
+void
+sminloc0_4_i8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_r10.c b/libgfortran/generated/minloc0_4_r10.c
index a29677d03bc..5c0ccfbb59f 100644
--- a/libgfortran/generated/minloc0_4_r10.c
+++ b/libgfortran/generated/minloc0_4_r10.c
@@ -293,4 +293,56 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_r10 (gfc_array_i4 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_r10);
+
+void
+sminloc0_4_r10 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_r16.c b/libgfortran/generated/minloc0_4_r16.c
index 61cf4b1b9de..fbb75bab50c 100644
--- a/libgfortran/generated/minloc0_4_r16.c
+++ b/libgfortran/generated/minloc0_4_r16.c
@@ -293,4 +293,56 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_r16 (gfc_array_i4 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_r16);
+
+void
+sminloc0_4_r16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c
index f55bbae1f4a..911117696ea 100644
--- a/libgfortran/generated/minloc0_4_r4.c
+++ b/libgfortran/generated/minloc0_4_r4.c
@@ -293,4 +293,56 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_r4 (gfc_array_i4 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_r4);
+
+void
+sminloc0_4_r4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c
index d8a2f825432..461bedb9dfb 100644
--- a/libgfortran/generated/minloc0_4_r8.c
+++ b/libgfortran/generated/minloc0_4_r8.c
@@ -293,4 +293,56 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc0_4_r8 (gfc_array_i4 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_4_r8);
+
+void
+sminloc0_4_r8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc0_4_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_i16.c b/libgfortran/generated/minloc0_8_i16.c
index a6346cfa609..92bb0a22519 100644
--- a/libgfortran/generated/minloc0_8_i16.c
+++ b/libgfortran/generated/minloc0_8_i16.c
@@ -293,4 +293,56 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_i16 (gfc_array_i8 * const restrict,
+ gfc_array_i16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_i16);
+
+void
+sminloc0_8_i16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_i16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c
index 2aa54535bc7..6229244751f 100644
--- a/libgfortran/generated/minloc0_8_i4.c
+++ b/libgfortran/generated/minloc0_8_i4.c
@@ -293,4 +293,56 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_i4 (gfc_array_i8 * const restrict,
+ gfc_array_i4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_i4);
+
+void
+sminloc0_8_i4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_i4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c
index 63dd21a7766..01090ed9366 100644
--- a/libgfortran/generated/minloc0_8_i8.c
+++ b/libgfortran/generated/minloc0_8_i8.c
@@ -293,4 +293,56 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_i8);
+
+void
+sminloc0_8_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_i8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c
index c627e7eeb14..8bd4251829a 100644
--- a/libgfortran/generated/minloc0_8_r10.c
+++ b/libgfortran/generated/minloc0_8_r10.c
@@ -293,4 +293,56 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_r10 (gfc_array_i8 * const restrict,
+ gfc_array_r10 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_r10);
+
+void
+sminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_r10 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_r16.c b/libgfortran/generated/minloc0_8_r16.c
index d4e307187a2..ea229d7e403 100644
--- a/libgfortran/generated/minloc0_8_r16.c
+++ b/libgfortran/generated/minloc0_8_r16.c
@@ -293,4 +293,56 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_r16 (gfc_array_i8 * const restrict,
+ gfc_array_r16 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_r16);
+
+void
+sminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_r16 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c
index c484e8d325b..e91466e28ad 100644
--- a/libgfortran/generated/minloc0_8_r4.c
+++ b/libgfortran/generated/minloc0_8_r4.c
@@ -293,4 +293,56 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_r4 (gfc_array_i8 * const restrict,
+ gfc_array_r4 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_r4);
+
+void
+sminloc0_8_r4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_r4 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c
index 97f19cefff4..00d3718f92f 100644
--- a/libgfortran/generated/minloc0_8_r8.c
+++ b/libgfortran/generated/minloc0_8_r8.c
@@ -293,4 +293,56 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc0_8_r8 (gfc_array_i8 * const restrict,
+ gfc_array_r8 * const restrict, GFC_LOGICAL_4 *);
+export_proto(sminloc0_8_r8);
+
+void
+sminloc0_8_r8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type dstride;
+ index_type n;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc0_8_r8 (retarray, array);
+ return;
+ }
+
+ rank = GFC_DESCRIPTOR_RANK (array);
+
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+ for (n = 0; n<rank; n++)
+ dest[n * dstride] = 0 ;
+}
#endif
diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c
index 75e505494a3..5c49e798e06 100644
--- a/libgfortran/generated/minloc1_16_i16.c
+++ b/libgfortran/generated/minloc1_16_i16.c
@@ -350,4 +350,58 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_i16);
+
+void
+sminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c
index d2fdd541483..cba6b90cfb8 100644
--- a/libgfortran/generated/minloc1_16_i4.c
+++ b/libgfortran/generated/minloc1_16_i4.c
@@ -350,4 +350,58 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_i4 (gfc_array_i16 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_i4);
+
+void
+sminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c
index 19ac6d77352..ba8be3987ad 100644
--- a/libgfortran/generated/minloc1_16_i8.c
+++ b/libgfortran/generated/minloc1_16_i8.c
@@ -350,4 +350,58 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_i8 (gfc_array_i16 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_i8);
+
+void
+sminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c
index cc3d59b0256..3553c224faa 100644
--- a/libgfortran/generated/minloc1_16_r10.c
+++ b/libgfortran/generated/minloc1_16_r10.c
@@ -350,4 +350,58 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_r10 (gfc_array_i16 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_r10);
+
+void
+sminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c
index 76e8787ad62..258a5e21561 100644
--- a/libgfortran/generated/minloc1_16_r16.c
+++ b/libgfortran/generated/minloc1_16_r16.c
@@ -350,4 +350,58 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_r16 (gfc_array_i16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_r16);
+
+void
+sminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c
index 46ed3b63280..86ba6670040 100644
--- a/libgfortran/generated/minloc1_16_r4.c
+++ b/libgfortran/generated/minloc1_16_r4.c
@@ -350,4 +350,58 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_r4 (gfc_array_i16 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_r4);
+
+void
+sminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c
index 2d8bbf915f6..1fe86e5019c 100644
--- a/libgfortran/generated/minloc1_16_r8.c
+++ b/libgfortran/generated/minloc1_16_r8.c
@@ -350,4 +350,58 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminloc1_16_r8 (gfc_array_i16 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_16_r8);
+
+void
+sminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minloc1_16_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c
index 94712f4ecec..5952d216005 100644
--- a/libgfortran/generated/minloc1_4_i16.c
+++ b/libgfortran/generated/minloc1_4_i16.c
@@ -350,4 +350,58 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_i16 (gfc_array_i4 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_i16);
+
+void
+sminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c
index a80d2c68d07..79321f14a81 100644
--- a/libgfortran/generated/minloc1_4_i4.c
+++ b/libgfortran/generated/minloc1_4_i4.c
@@ -350,4 +350,58 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_i4);
+
+void
+sminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c
index 55c837034e4..625328beac9 100644
--- a/libgfortran/generated/minloc1_4_i8.c
+++ b/libgfortran/generated/minloc1_4_i8.c
@@ -350,4 +350,58 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_i8 (gfc_array_i4 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_i8);
+
+void
+sminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c
index 1d9b7547ec2..ab4d5b415b7 100644
--- a/libgfortran/generated/minloc1_4_r10.c
+++ b/libgfortran/generated/minloc1_4_r10.c
@@ -350,4 +350,58 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_r10 (gfc_array_i4 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_r10);
+
+void
+sminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c
index df903cb2d3d..9ffdd331dda 100644
--- a/libgfortran/generated/minloc1_4_r16.c
+++ b/libgfortran/generated/minloc1_4_r16.c
@@ -350,4 +350,58 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_r16 (gfc_array_i4 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_r16);
+
+void
+sminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c
index e723e92d20c..a91ee8da0de 100644
--- a/libgfortran/generated/minloc1_4_r4.c
+++ b/libgfortran/generated/minloc1_4_r4.c
@@ -350,4 +350,58 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_r4 (gfc_array_i4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_r4);
+
+void
+sminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c
index 5fbf3ec0482..355333d20a5 100644
--- a/libgfortran/generated/minloc1_4_r8.c
+++ b/libgfortran/generated/minloc1_4_r8.c
@@ -350,4 +350,58 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminloc1_4_r8 (gfc_array_i4 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_4_r8);
+
+void
+sminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minloc1_4_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c
index 07cbf78c511..4e78589fc60 100644
--- a/libgfortran/generated/minloc1_8_i16.c
+++ b/libgfortran/generated/minloc1_8_i16.c
@@ -350,4 +350,58 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_i16 (gfc_array_i8 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_i16);
+
+void
+sminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c
index 917c0b274ba..ae71c33ff50 100644
--- a/libgfortran/generated/minloc1_8_i4.c
+++ b/libgfortran/generated/minloc1_8_i4.c
@@ -350,4 +350,58 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_i4 (gfc_array_i8 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_i4);
+
+void
+sminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c
index c9a15276176..31cc82213a0 100644
--- a/libgfortran/generated/minloc1_8_i8.c
+++ b/libgfortran/generated/minloc1_8_i8.c
@@ -350,4 +350,58 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_i8);
+
+void
+sminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c
index c36838c10d8..3dd3b1eca1c 100644
--- a/libgfortran/generated/minloc1_8_r10.c
+++ b/libgfortran/generated/minloc1_8_r10.c
@@ -350,4 +350,58 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_r10 (gfc_array_i8 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_r10);
+
+void
+sminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c
index 93352946319..9de92d07d3e 100644
--- a/libgfortran/generated/minloc1_8_r16.c
+++ b/libgfortran/generated/minloc1_8_r16.c
@@ -350,4 +350,58 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_r16 (gfc_array_i8 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_r16);
+
+void
+sminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c
index 69ebc29e0d0..a47ef259afa 100644
--- a/libgfortran/generated/minloc1_8_r4.c
+++ b/libgfortran/generated/minloc1_8_r4.c
@@ -350,4 +350,58 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_r4 (gfc_array_i8 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_r4);
+
+void
+sminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c
index 7d662d5016b..2637fe6351f 100644
--- a/libgfortran/generated/minloc1_8_r8.c
+++ b/libgfortran/generated/minloc1_8_r8.c
@@ -350,4 +350,58 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminloc1_8_r8 (gfc_array_i8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminloc1_8_r8);
+
+void
+sminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minloc1_8_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c
index 5b34eafaaf7..f1c2e3852e6 100644
--- a/libgfortran/generated/minval_i16.c
+++ b/libgfortran/generated/minval_i16.c
@@ -339,4 +339,58 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sminval_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_i16);
+
+void
+sminval_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ minval_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_INTEGER_16_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c
index bcdb55f3120..bb79787119d 100644
--- a/libgfortran/generated/minval_i4.c
+++ b/libgfortran/generated/minval_i4.c
@@ -339,4 +339,58 @@ mminval_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sminval_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_i4);
+
+void
+sminval_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ minval_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_INTEGER_4_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c
index eb37d4824b9..deb53391221 100644
--- a/libgfortran/generated/minval_i8.c
+++ b/libgfortran/generated/minval_i8.c
@@ -339,4 +339,58 @@ mminval_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sminval_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_i8);
+
+void
+sminval_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ minval_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_INTEGER_8_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c
index a52e5a1b35a..be02a66dab9 100644
--- a/libgfortran/generated/minval_r10.c
+++ b/libgfortran/generated/minval_r10.c
@@ -339,4 +339,58 @@ mminval_r10 (gfc_array_r10 * const restrict retarray,
}
}
+
+extern void sminval_r10 (gfc_array_r10 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_r10);
+
+void
+sminval_r10 (gfc_array_r10 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_10 *dest;
+
+ if (*mask)
+ {
+ minval_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_REAL_10_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c
index 61ecd81746f..cacd524fff0 100644
--- a/libgfortran/generated/minval_r16.c
+++ b/libgfortran/generated/minval_r16.c
@@ -339,4 +339,58 @@ mminval_r16 (gfc_array_r16 * const restrict retarray,
}
}
+
+extern void sminval_r16 (gfc_array_r16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_r16);
+
+void
+sminval_r16 (gfc_array_r16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_16 *dest;
+
+ if (*mask)
+ {
+ minval_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_REAL_16_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c
index 4eafed2eda1..0f383d97a4c 100644
--- a/libgfortran/generated/minval_r4.c
+++ b/libgfortran/generated/minval_r4.c
@@ -339,4 +339,58 @@ mminval_r4 (gfc_array_r4 * const restrict retarray,
}
}
+
+extern void sminval_r4 (gfc_array_r4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_r4);
+
+void
+sminval_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_4 *dest;
+
+ if (*mask)
+ {
+ minval_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_REAL_4_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c
index 6b83f9b05d3..31ba6193565 100644
--- a/libgfortran/generated/minval_r8.c
+++ b/libgfortran/generated/minval_r8.c
@@ -339,4 +339,58 @@ mminval_r8 (gfc_array_r8 * const restrict retarray,
}
}
+
+extern void sminval_r8 (gfc_array_r8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sminval_r8);
+
+void
+sminval_r8 (gfc_array_r8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_8 *dest;
+
+ if (*mask)
+ {
+ minval_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = GFC_REAL_8_HUGE ;
+}
+
#endif
diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c
index bc1e9f0aef2..59552f276d5 100644
--- a/libgfortran/generated/product_c10.c
+++ b/libgfortran/generated/product_c10.c
@@ -337,4 +337,58 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray,
}
}
+
+extern void sproduct_c10 (gfc_array_c10 * const restrict,
+ gfc_array_c10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_c10);
+
+void
+sproduct_c10 (gfc_array_c10 * const restrict retarray,
+ gfc_array_c10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_10 *dest;
+
+ if (*mask)
+ {
+ product_c10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c
index c5ac52fb834..97b6ac1a219 100644
--- a/libgfortran/generated/product_c16.c
+++ b/libgfortran/generated/product_c16.c
@@ -337,4 +337,58 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray,
}
}
+
+extern void sproduct_c16 (gfc_array_c16 * const restrict,
+ gfc_array_c16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_c16);
+
+void
+sproduct_c16 (gfc_array_c16 * const restrict retarray,
+ gfc_array_c16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_16 *dest;
+
+ if (*mask)
+ {
+ product_c16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c
index c8e932bdde2..14dc21eaabe 100644
--- a/libgfortran/generated/product_c4.c
+++ b/libgfortran/generated/product_c4.c
@@ -337,4 +337,58 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray,
}
}
+
+extern void sproduct_c4 (gfc_array_c4 * const restrict,
+ gfc_array_c4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_c4);
+
+void
+sproduct_c4 (gfc_array_c4 * const restrict retarray,
+ gfc_array_c4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_4 *dest;
+
+ if (*mask)
+ {
+ product_c4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c
index 56485797edb..3313f2ab174 100644
--- a/libgfortran/generated/product_c8.c
+++ b/libgfortran/generated/product_c8.c
@@ -337,4 +337,58 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray,
}
}
+
+extern void sproduct_c8 (gfc_array_c8 * const restrict,
+ gfc_array_c8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_c8);
+
+void
+sproduct_c8 (gfc_array_c8 * const restrict retarray,
+ gfc_array_c8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_8 *dest;
+
+ if (*mask)
+ {
+ product_c8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c
index 2b2f314f5cc..7079dc43413 100644
--- a/libgfortran/generated/product_i16.c
+++ b/libgfortran/generated/product_i16.c
@@ -337,4 +337,58 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void sproduct_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_i16);
+
+void
+sproduct_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ product_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c
index 19a7858e414..da88e97556e 100644
--- a/libgfortran/generated/product_i4.c
+++ b/libgfortran/generated/product_i4.c
@@ -337,4 +337,58 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void sproduct_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_i4);
+
+void
+sproduct_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ product_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c
index 22b513530de..c60e8f76572 100644
--- a/libgfortran/generated/product_i8.c
+++ b/libgfortran/generated/product_i8.c
@@ -337,4 +337,58 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void sproduct_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_i8);
+
+void
+sproduct_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ product_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c
index 9777df66a29..710216fff83 100644
--- a/libgfortran/generated/product_r10.c
+++ b/libgfortran/generated/product_r10.c
@@ -337,4 +337,58 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray,
}
}
+
+extern void sproduct_r10 (gfc_array_r10 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_r10);
+
+void
+sproduct_r10 (gfc_array_r10 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_10 *dest;
+
+ if (*mask)
+ {
+ product_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c
index e9d84eab314..b6df4ddbb2a 100644
--- a/libgfortran/generated/product_r16.c
+++ b/libgfortran/generated/product_r16.c
@@ -337,4 +337,58 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray,
}
}
+
+extern void sproduct_r16 (gfc_array_r16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_r16);
+
+void
+sproduct_r16 (gfc_array_r16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_16 *dest;
+
+ if (*mask)
+ {
+ product_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c
index 8b421d36539..e31b3945279 100644
--- a/libgfortran/generated/product_r4.c
+++ b/libgfortran/generated/product_r4.c
@@ -337,4 +337,58 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray,
}
}
+
+extern void sproduct_r4 (gfc_array_r4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_r4);
+
+void
+sproduct_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_4 *dest;
+
+ if (*mask)
+ {
+ product_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c
index 57094cf6f0a..a2e805c0d33 100644
--- a/libgfortran/generated/product_r8.c
+++ b/libgfortran/generated/product_r8.c
@@ -337,4 +337,58 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray,
}
}
+
+extern void sproduct_r8 (gfc_array_r8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(sproduct_r8);
+
+void
+sproduct_r8 (gfc_array_r8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_8 *dest;
+
+ if (*mask)
+ {
+ product_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 1 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c
index 393f04ece4c..344fd3ff386 100644
--- a/libgfortran/generated/sum_c10.c
+++ b/libgfortran/generated/sum_c10.c
@@ -337,4 +337,58 @@ msum_c10 (gfc_array_c10 * const restrict retarray,
}
}
+
+extern void ssum_c10 (gfc_array_c10 * const restrict,
+ gfc_array_c10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_c10);
+
+void
+ssum_c10 (gfc_array_c10 * const restrict retarray,
+ gfc_array_c10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_10 *dest;
+
+ if (*mask)
+ {
+ sum_c10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c
index 9e5c8edb138..8cdf9766c53 100644
--- a/libgfortran/generated/sum_c16.c
+++ b/libgfortran/generated/sum_c16.c
@@ -337,4 +337,58 @@ msum_c16 (gfc_array_c16 * const restrict retarray,
}
}
+
+extern void ssum_c16 (gfc_array_c16 * const restrict,
+ gfc_array_c16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_c16);
+
+void
+ssum_c16 (gfc_array_c16 * const restrict retarray,
+ gfc_array_c16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_16 *dest;
+
+ if (*mask)
+ {
+ sum_c16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c
index 72d28f8afa0..1e113ad85ce 100644
--- a/libgfortran/generated/sum_c4.c
+++ b/libgfortran/generated/sum_c4.c
@@ -337,4 +337,58 @@ msum_c4 (gfc_array_c4 * const restrict retarray,
}
}
+
+extern void ssum_c4 (gfc_array_c4 * const restrict,
+ gfc_array_c4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_c4);
+
+void
+ssum_c4 (gfc_array_c4 * const restrict retarray,
+ gfc_array_c4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_4 *dest;
+
+ if (*mask)
+ {
+ sum_c4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c
index 485b46d75fb..eec1b783826 100644
--- a/libgfortran/generated/sum_c8.c
+++ b/libgfortran/generated/sum_c8.c
@@ -337,4 +337,58 @@ msum_c8 (gfc_array_c8 * const restrict retarray,
}
}
+
+extern void ssum_c8 (gfc_array_c8 * const restrict,
+ gfc_array_c8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_c8);
+
+void
+ssum_c8 (gfc_array_c8 * const restrict retarray,
+ gfc_array_c8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_COMPLEX_8 *dest;
+
+ if (*mask)
+ {
+ sum_c8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_COMPLEX_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c
index 00446895d0a..2a378361ff3 100644
--- a/libgfortran/generated/sum_i16.c
+++ b/libgfortran/generated/sum_i16.c
@@ -337,4 +337,58 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
}
}
+
+extern void ssum_i16 (gfc_array_i16 * const restrict,
+ gfc_array_i16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_i16);
+
+void
+ssum_i16 (gfc_array_i16 * const restrict retarray,
+ gfc_array_i16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_16 *dest;
+
+ if (*mask)
+ {
+ sum_i16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c
index f00c4ea3f15..4062a3bbe15 100644
--- a/libgfortran/generated/sum_i4.c
+++ b/libgfortran/generated/sum_i4.c
@@ -337,4 +337,58 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
}
}
+
+extern void ssum_i4 (gfc_array_i4 * const restrict,
+ gfc_array_i4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_i4);
+
+void
+ssum_i4 (gfc_array_i4 * const restrict retarray,
+ gfc_array_i4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_4 *dest;
+
+ if (*mask)
+ {
+ sum_i4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c
index 78505da9865..ce02c063488 100644
--- a/libgfortran/generated/sum_i8.c
+++ b/libgfortran/generated/sum_i8.c
@@ -337,4 +337,58 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
}
}
+
+extern void ssum_i8 (gfc_array_i8 * const restrict,
+ gfc_array_i8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_i8);
+
+void
+ssum_i8 (gfc_array_i8 * const restrict retarray,
+ gfc_array_i8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_INTEGER_8 *dest;
+
+ if (*mask)
+ {
+ sum_i8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c
index 49071021f0d..07f6ae397fc 100644
--- a/libgfortran/generated/sum_r10.c
+++ b/libgfortran/generated/sum_r10.c
@@ -337,4 +337,58 @@ msum_r10 (gfc_array_r10 * const restrict retarray,
}
}
+
+extern void ssum_r10 (gfc_array_r10 * const restrict,
+ gfc_array_r10 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_r10);
+
+void
+ssum_r10 (gfc_array_r10 * const restrict retarray,
+ gfc_array_r10 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_10 *dest;
+
+ if (*mask)
+ {
+ sum_r10 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_10) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c
index eddd45b8646..975bc258536 100644
--- a/libgfortran/generated/sum_r16.c
+++ b/libgfortran/generated/sum_r16.c
@@ -337,4 +337,58 @@ msum_r16 (gfc_array_r16 * const restrict retarray,
}
}
+
+extern void ssum_r16 (gfc_array_r16 * const restrict,
+ gfc_array_r16 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_r16);
+
+void
+ssum_r16 (gfc_array_r16 * const restrict retarray,
+ gfc_array_r16 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_16 *dest;
+
+ if (*mask)
+ {
+ sum_r16 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_16) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c
index 97bf717ba5a..db905ae4c13 100644
--- a/libgfortran/generated/sum_r4.c
+++ b/libgfortran/generated/sum_r4.c
@@ -337,4 +337,58 @@ msum_r4 (gfc_array_r4 * const restrict retarray,
}
}
+
+extern void ssum_r4 (gfc_array_r4 * const restrict,
+ gfc_array_r4 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_r4);
+
+void
+ssum_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_4 *dest;
+
+ if (*mask)
+ {
+ sum_r4 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_4) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c
index 0f3b49c278b..ed2440be39a 100644
--- a/libgfortran/generated/sum_r8.c
+++ b/libgfortran/generated/sum_r8.c
@@ -337,4 +337,58 @@ msum_r8 (gfc_array_r8 * const restrict retarray,
}
}
+
+extern void ssum_r8 (gfc_array_r8 * const restrict,
+ gfc_array_r8 * const restrict, const index_type * const restrict,
+ GFC_LOGICAL_4 *);
+export_proto(ssum_r8);
+
+void
+ssum_r8 (gfc_array_r8 * const restrict retarray,
+ gfc_array_r8 * const restrict array,
+ const index_type * const restrict pdim,
+ GFC_LOGICAL_4 * mask)
+{
+ index_type rank;
+ index_type n;
+ index_type dstride;
+ GFC_REAL_8 *dest;
+
+ if (*mask)
+ {
+ sum_r8 (retarray, array, pdim);
+ return;
+ }
+ rank = GFC_DESCRIPTOR_RANK (array);
+ if (rank <= 0)
+ runtime_error ("Rank of array needs to be > 0");
+
+ if (retarray->data == NULL)
+ {
+ retarray->dim[0].lbound = 0;
+ retarray->dim[0].ubound = rank-1;
+ retarray->dim[0].stride = 1;
+ retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
+ retarray->offset = 0;
+ retarray->data = internal_malloc_size (sizeof (GFC_REAL_8) * rank);
+ }
+ else
+ {
+ if (GFC_DESCRIPTOR_RANK (retarray) != 1)
+ runtime_error ("rank of return array does not equal 1");
+
+ if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
+ runtime_error ("dimension of return array incorrect");
+
+ if (retarray->dim[0].stride == 0)
+ retarray->dim[0].stride = 1;
+ }
+
+ dstride = retarray->dim[0].stride;
+ dest = retarray->data;
+
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = 0 ;
+}
+
#endif
OpenPOWER on IntegriCloud