summaryrefslogtreecommitdiff
path: root/libgfortran/generated/minloc1_4_r10.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/minloc1_4_r10.c')
-rw-r--r--libgfortran/generated/minloc1_4_r10.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c
index a224fd3ef05..a020a9908a6 100644
--- a/libgfortran/generated/minloc1_4_r10.c
+++ b/libgfortran/generated/minloc1_4_r10.c
@@ -57,12 +57,15 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray,
index_type len;
index_type delta;
index_type dim;
+ int continue_loop;
/* Make dim zero based to avoid confusion. */
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
+ if (len < 0)
+ len = 0;
delta = array->dim[dim].stride;
for (n = 0; n < dim; n++)
@@ -149,7 +152,8 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray,
base = array->data;
dest = retarray->data;
- while (base)
+ continue_loop = 1;
+ while (continue_loop)
{
const GFC_REAL_10 * restrict src;
GFC_INTEGER_4 result;
@@ -193,8 +197,8 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray,
if (n == rank)
{
/* Break out of the look. */
- base = NULL;
- break;
+ continue_loop = 0;
+ break;
}
else
{