summaryrefslogtreecommitdiff
path: root/libgfortran/generated/minloc0_8_r10.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/minloc0_8_r10.c')
-rw-r--r--libgfortran/generated/minloc0_8_r10.c58
1 files changed, 37 insertions, 21 deletions
diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c
index c74fe0f6e8b..14b8a62f510 100644
--- a/libgfortran/generated/minloc0_8_r10.c
+++ b/libgfortran/generated/minloc0_8_r10.c
@@ -47,7 +47,6 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray,
index_type rank;
index_type n;
- assert(back == 0);
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
@@ -101,13 +100,9 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray,
#endif
while (base)
{
- do
- {
/* Implementation start. */
#if defined(GFC_REAL_10_QUIET_NAN)
- }
- while (0);
if (unlikely (!fast))
{
do
@@ -126,15 +121,29 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray,
if (likely (fast))
continue;
}
- else do
- {
+ else
#endif
- if (*base < minval)
+ if (back)
+ do
+ {
+ if (unlikely (*base <= minval))
{
minval = *base;
for (n = 0; n < rank; n++)
dest[n * dstride] = count[n] + 1;
}
+ base += sstride[0];
+ }
+ while (++count[0] != extent[0]);
+ else
+ do
+ {
+ if (unlikely (*base < minval))
+ {
+ minval = *base;
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = count[n] + 1;
+ }
/* Implementation end. */
/* Advance to the next element. */
base += sstride[0];
@@ -167,7 +176,6 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray,
}
}
-
extern void mminloc0_8_r10 (gfc_array_i8 * const restrict,
gfc_array_r10 * const restrict, gfc_array_l1 * const restrict,
GFC_LOGICAL_4);
@@ -190,7 +198,6 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
index_type n;
int mask_kind;
- assert(back == 0);
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
@@ -261,12 +268,8 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
#endif
while (base)
{
- do
- {
/* Implementation start. */
- }
- while (0);
if (unlikely (!fast))
{
do
@@ -294,14 +297,28 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
if (likely (fast))
continue;
}
- else do
- {
- if (*mbase && *base < minval)
+ else
+ if (back)
+ do
{
- minval = *base;
- for (n = 0; n < rank; n++)
- dest[n * dstride] = count[n] + 1;
+ if (unlikely (*mbase && (*base <= minval)))
+ {
+ minval = *base;
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = count[n] + 1;
+ }
+ base += sstride[0];
}
+ while (++count[0] != extent[0]);
+ else
+ do
+ {
+ if (unlikely (*mbase && (*base < minval)))
+ {
+ minval = *base;
+ for (n = 0; n < rank; n++)
+ dest[n * dstride] = count[n] + 1;
+ }
/* Implementation end. */
/* Advance to the next element. */
base += sstride[0];
@@ -337,7 +354,6 @@ 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 *, GFC_LOGICAL_4);
export_proto(sminloc0_8_r10);