summaryrefslogtreecommitdiff
path: root/libgfortran/generated/any_l16.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-06 07:25:24 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-06 07:25:24 +0000
commit1e7864e44136433004d5c8adb767dddf90830cb4 (patch)
tree09b0a22654ae562c449d45f3d1fb178722c10a17 /libgfortran/generated/any_l16.c
parent9306644f396b57a5977c121820ef4cf010217f71 (diff)
downloadgcc-1e7864e44136433004d5c8adb767dddf90830cb4.tar.gz
2008-05-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r134973 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@134974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/any_l16.c')
-rw-r--r--libgfortran/generated/any_l16.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/generated/any_l16.c b/libgfortran/generated/any_l16.c
index 060a4b82127..3d7cd1b1ef9 100644
--- a/libgfortran/generated/any_l16.c
+++ b/libgfortran/generated/any_l16.c
@@ -57,6 +57,7 @@ any_l16 (gfc_array_l16 * const restrict retarray,
index_type delta;
index_type dim;
int src_kind;
+ int continue_loop;
/* Make dim zero based to avoid confusion. */
dim = (*pdim) - 1;
@@ -65,6 +66,9 @@ any_l16 (gfc_array_l16 * const restrict retarray,
src_kind = GFC_DESCRIPTOR_SIZE (array);
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
+ if (len < 0)
+ len = 0;
+
delta = array->dim[dim].stride * src_kind;
for (n = 0; n < dim; n++)
@@ -164,7 +168,8 @@ any_l16 (gfc_array_l16 * const restrict retarray,
dest = retarray->data;
- while (base)
+ continue_loop = 1;
+ while (continue_loop)
{
const GFC_LOGICAL_1 * restrict src;
GFC_LOGICAL_16 result;
@@ -207,7 +212,7 @@ any_l16 (gfc_array_l16 * const restrict retarray,
if (n == rank)
{
/* Break out of the look. */
- base = NULL;
+ continue_loop = 0;
break;
}
else