aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2018-01-31 16:16:22 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2018-01-31 16:16:22 +0200
commit7a157266876058eee921323240e4bfd7e5a84fba (patch)
treee8ba29378820ddd29c4b97a197217560ac1a8f19 /libgfortran/generated
parent9f3dcd14146c29ca01507051ae9729a0f5569173 (diff)
downloadgcc-7a157266876058eee921323240e4bfd7e5a84fba.zip
gcc-7a157266876058eee921323240e4bfd7e5a84fba.tar.gz
gcc-7a157266876058eee921323240e4bfd7e5a84fba.tar.bz2
Use pointer sized array indices.
Using pointer sized variables (e.g. size_t / ptrdiff_t) when the variables are used as array indices allows accessing larger arrays, and can be a slight performance improvement due to no need for sign or zero extending, or masking. Regtested on x86_64-pc-linux-gnu. libgfortran/ChangeLog: 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org> * generated/cshift1_16.c (cshift1): Regenerated. * generated/cshift1_4.c (cshift1): Regenerated. * generated/cshift1_8.c (cshift1): Regenerated. * generated/eoshift1_16.c (eoshift1): Regenerated. * generated/eoshift1_4.c (eoshift1): Regenerated. * generated/eoshift1_8.c (eoshift1): Regenerated. * generated/eoshift3_16.c (eoshift3): Regenerated. * generated/eoshift3_4.c (eoshift3): Regenerated. * generated/eoshift3_8.c (eoshift3): Regenerated. * generated/in_pack_c10.c (internal_pack_c10): Regenerated. * generated/in_pack_c16.c (internal_pack_c16): Regenerated. * generated/in_pack_c4.c (internal_pack_c4): Regenerated. * generated/in_pack_c8.c (internal_pack_c8): Regenerated. * generated/in_pack_i1.c (internal_pack_1): Regenerated. * generated/in_pack_i16.c (internal_pack_16): Regenerated. * generated/in_pack_i2.c (internal_pack_2): Regenerated. * generated/in_pack_i4.c (internal_pack_4): Regenerated. * generated/in_pack_i8.c (internal_pack_8): Regenerated. * generated/in_pack_r10.c (internal_pack_r10): Regenerated. * generated/in_pack_r16.c (internal_pack_r16): Regenerated. * generated/in_pack_r4.c (internal_pack_r4): Regenerated. * generated/in_pack_r8.c (internal_pack_r8): Regenerated. * generated/in_unpack_c10.c (internal_unpack_c10): Regenerated. * generated/in_unpack_c16.c (internal_unpack_c16): Regenerated. * generated/in_unpack_c4.c (internal_unpack_c4): Regenerated. * generated/in_unpack_c8.c (internal_unpack_c8): Regenerated. * generated/in_unpack_i1.c (internal_unpack_1): Regenerated. * generated/in_unpack_i16.c (internal_unpack_16): Regenerated. * generated/in_unpack_i2.c (internal_unpack_2): Regenerated. * generated/in_unpack_i4.c (internal_unpack_4): Regenerated. * generated/in_unpack_i8.c (internal_unpack_8): Regenerated. * generated/in_unpack_r10.c (internal_unpack_r10): Regenerated. * generated/in_unpack_r16.c (internal_unpack_r16): Regenerated. * generated/in_unpack_r4.c (internal_unpack_r4): Regenerated. * generated/in_unpack_r8.c (internal_unpack_r8): Regenerated. * generated/reshape_c10.c (reshape_c10): Regenerated. * generated/reshape_c16.c (reshape_c16): Regenerated. * generated/reshape_c4.c (reshape_c4): Regenerated. * generated/reshape_c8.c (reshape_c8): Regenerated. * generated/reshape_i16.c (reshape_16): Regenerated. * generated/reshape_i4.c (reshape_4): Regenerated. * generated/reshape_i8.c (reshape_8): Regenerated. * generated/reshape_r10.c (reshape_r10): Regenerated. * generated/reshape_r16.c (reshape_r16): Regenerated. * generated/reshape_r4.c (reshape_r4): Regenerated. * generated/reshape_r8.c (reshape_r8): Regenerated. * generated/shape_i1.c (shape_1): Regenerated. * generated/shape_i16.c (shape_16): Regenerated. * generated/shape_i2.c (shape_2): Regenerated. * generated/shape_i4.c (shape_4): Regenerated. * generated/shape_i8.c (shape_8): Regenerated. * generated/spread_c10.c (spread_scalar_c10): Regenerated. * generated/spread_c16.c (spread_scalar_c16): Regenerated. * generated/spread_c4.c (spread_scalar_c4): Regenerated. * generated/spread_c8.c (spread_scalar_c8): Regenerated. * generated/spread_i1.c (spread_scalar_i1): Regenerated. * generated/spread_i16.c (spread_scalar_i16): Regenerated. * generated/spread_i2.c (spread_scalar_i2): Regenerated. * generated/spread_i4.c (spread_scalar_i4): Regenerated. * generated/spread_i8.c (spread_scalar_i8): Regenerated. * generated/spread_r10.c (spread_scalar_r10): Regenerated. * generated/spread_r16.c (spread_scalar_r16): Regenerated. * generated/spread_r4.c (spread_scalar_r4): Regenerated. * generated/spread_r8.c (spread_scalar_r8): Regenerated. * intrinsics/random.c (jump): Use size_t for array index in loop. (getosrandom): Likewise. (arandom_r4): Make n an index_type. (arandom_r8): Likewise. (arandom_r10): Likewise. (arandom_r16): Likewise. (scramble_seed): Use size_t for array index in loop. * m4/cshift1.m4: Make i an index_type. * m4/eoshift1.m4: Likewise. * m4/eoshift3.m4: Likewise. * m4/in_pack.m4: Make n an index_type. * m4/in_unpack.m4: Likewise. * m4/reshape.m4: Make n and dim index_type's. * m4/shape.m4: Make n an index_type. * m4/spread.m4: Likewise, use index_type argument rather than copying to int. * runtime/bounds.c (bounds_ifunction_return): Make n an index_type. * runtime/in_pack_generic.c (internal_pack): Likewise. * runtime/in_unpack_generic.c (internal_unpack): Make n and size index_type's. From-SVN: r257234
Diffstat (limited to 'libgfortran/generated')
-rw-r--r--libgfortran/generated/cshift1_16.c4
-rw-r--r--libgfortran/generated/cshift1_4.c4
-rw-r--r--libgfortran/generated/cshift1_8.c4
-rw-r--r--libgfortran/generated/eoshift1_16.c4
-rw-r--r--libgfortran/generated/eoshift1_4.c4
-rw-r--r--libgfortran/generated/eoshift1_8.c4
-rw-r--r--libgfortran/generated/eoshift3_16.c4
-rw-r--r--libgfortran/generated/eoshift3_4.c4
-rw-r--r--libgfortran/generated/eoshift3_8.c4
-rw-r--r--libgfortran/generated/in_pack_c10.c5
-rw-r--r--libgfortran/generated/in_pack_c16.c5
-rw-r--r--libgfortran/generated/in_pack_c4.c5
-rw-r--r--libgfortran/generated/in_pack_c8.c5
-rw-r--r--libgfortran/generated/in_pack_i1.c5
-rw-r--r--libgfortran/generated/in_pack_i16.c5
-rw-r--r--libgfortran/generated/in_pack_i2.c5
-rw-r--r--libgfortran/generated/in_pack_i4.c5
-rw-r--r--libgfortran/generated/in_pack_i8.c5
-rw-r--r--libgfortran/generated/in_pack_r10.c5
-rw-r--r--libgfortran/generated/in_pack_r16.c5
-rw-r--r--libgfortran/generated/in_pack_r4.c5
-rw-r--r--libgfortran/generated/in_pack_r8.c5
-rw-r--r--libgfortran/generated/in_unpack_c10.c5
-rw-r--r--libgfortran/generated/in_unpack_c16.c5
-rw-r--r--libgfortran/generated/in_unpack_c4.c5
-rw-r--r--libgfortran/generated/in_unpack_c8.c5
-rw-r--r--libgfortran/generated/in_unpack_i1.c5
-rw-r--r--libgfortran/generated/in_unpack_i16.c5
-rw-r--r--libgfortran/generated/in_unpack_i2.c5
-rw-r--r--libgfortran/generated/in_unpack_i4.c5
-rw-r--r--libgfortran/generated/in_unpack_i8.c5
-rw-r--r--libgfortran/generated/in_unpack_r10.c5
-rw-r--r--libgfortran/generated/in_unpack_r16.c5
-rw-r--r--libgfortran/generated/in_unpack_r4.c5
-rw-r--r--libgfortran/generated/in_unpack_r8.c5
-rw-r--r--libgfortran/generated/reshape_c10.c27
-rw-r--r--libgfortran/generated/reshape_c16.c27
-rw-r--r--libgfortran/generated/reshape_c4.c27
-rw-r--r--libgfortran/generated/reshape_c8.c27
-rw-r--r--libgfortran/generated/reshape_i16.c27
-rw-r--r--libgfortran/generated/reshape_i4.c27
-rw-r--r--libgfortran/generated/reshape_i8.c27
-rw-r--r--libgfortran/generated/reshape_r10.c27
-rw-r--r--libgfortran/generated/reshape_r16.c27
-rw-r--r--libgfortran/generated/reshape_r4.c27
-rw-r--r--libgfortran/generated/reshape_r8.c27
-rw-r--r--libgfortran/generated/shape_i1.c6
-rw-r--r--libgfortran/generated/shape_i16.c6
-rw-r--r--libgfortran/generated/shape_i2.c6
-rw-r--r--libgfortran/generated/shape_i4.c6
-rw-r--r--libgfortran/generated/shape_i8.c6
-rw-r--r--libgfortran/generated/spread_c10.c6
-rw-r--r--libgfortran/generated/spread_c16.c6
-rw-r--r--libgfortran/generated/spread_c4.c6
-rw-r--r--libgfortran/generated/spread_c8.c6
-rw-r--r--libgfortran/generated/spread_i1.c6
-rw-r--r--libgfortran/generated/spread_i16.c6
-rw-r--r--libgfortran/generated/spread_i2.c6
-rw-r--r--libgfortran/generated/spread_i4.c6
-rw-r--r--libgfortran/generated/spread_i8.c6
-rw-r--r--libgfortran/generated/spread_r10.c6
-rw-r--r--libgfortran/generated/spread_r16.c6
-rw-r--r--libgfortran/generated/spread_r4.c6
-rw-r--r--libgfortran/generated/spread_r8.c6
64 files changed, 240 insertions, 331 deletions
diff --git a/libgfortran/generated/cshift1_16.c b/libgfortran/generated/cshift1_16.c
index 44746b37..6ebca1a 100644
--- a/libgfortran/generated/cshift1_16.c
+++ b/libgfortran/generated/cshift1_16.c
@@ -77,12 +77,10 @@ cshift1 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/cshift1_4.c b/libgfortran/generated/cshift1_4.c
index 4bb1c60..f28875f 100644
--- a/libgfortran/generated/cshift1_4.c
+++ b/libgfortran/generated/cshift1_4.c
@@ -77,12 +77,10 @@ cshift1 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/cshift1_8.c b/libgfortran/generated/cshift1_8.c
index 1686e82..3914dc6 100644
--- a/libgfortran/generated/cshift1_8.c
+++ b/libgfortran/generated/cshift1_8.c
@@ -77,12 +77,10 @@ cshift1 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift1_16.c b/libgfortran/generated/eoshift1_16.c
index 35620d6..39c06e4 100644
--- a/libgfortran/generated/eoshift1_16.c
+++ b/libgfortran/generated/eoshift1_16.c
@@ -84,11 +84,9 @@ eoshift1 (gfc_array_char * const restrict ret,
arraysize = size0 ((array_t *) array);
if (ret->base_addr == NULL)
{
- int i;
-
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift1_4.c b/libgfortran/generated/eoshift1_4.c
index 2e6c014..6848c50 100644
--- a/libgfortran/generated/eoshift1_4.c
+++ b/libgfortran/generated/eoshift1_4.c
@@ -84,11 +84,9 @@ eoshift1 (gfc_array_char * const restrict ret,
arraysize = size0 ((array_t *) array);
if (ret->base_addr == NULL)
{
- int i;
-
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c
index 4cd90a5..7444db7 100644
--- a/libgfortran/generated/eoshift1_8.c
+++ b/libgfortran/generated/eoshift1_8.c
@@ -84,11 +84,9 @@ eoshift1 (gfc_array_char * const restrict ret,
arraysize = size0 ((array_t *) array);
if (ret->base_addr == NULL)
{
- int i;
-
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift3_16.c b/libgfortran/generated/eoshift3_16.c
index 018b640..cf4a8d0 100644
--- a/libgfortran/generated/eoshift3_16.c
+++ b/libgfortran/generated/eoshift3_16.c
@@ -85,12 +85,10 @@ eoshift3 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift3_4.c b/libgfortran/generated/eoshift3_4.c
index c27dcba..f47577a 100644
--- a/libgfortran/generated/eoshift3_4.c
+++ b/libgfortran/generated/eoshift3_4.c
@@ -85,12 +85,10 @@ eoshift3 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/eoshift3_8.c b/libgfortran/generated/eoshift3_8.c
index 2649ced..b2814db 100644
--- a/libgfortran/generated/eoshift3_8.c
+++ b/libgfortran/generated/eoshift3_8.c
@@ -85,12 +85,10 @@ eoshift3 (gfc_array_char * const restrict ret,
if (ret->base_addr == NULL)
{
- int i;
-
ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
GFC_DTYPE_COPY(ret,array);
- for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ for (index_type i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
{
index_type ub, str;
diff --git a/libgfortran/generated/in_pack_c10.c b/libgfortran/generated/in_pack_c10.c
index a30be34..9c2ee4f 100644
--- a/libgfortran/generated/in_pack_c10.c
+++ b/libgfortran/generated/in_pack_c10.c
@@ -43,7 +43,6 @@ internal_pack_c10 (gfc_array_c10 * source)
const GFC_COMPLEX_10 *src;
GFC_COMPLEX_10 * restrict dest;
GFC_COMPLEX_10 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_c10 (gfc_array_c10 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_c10 (gfc_array_c10 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_c16.c b/libgfortran/generated/in_pack_c16.c
index 1562d97..9aab669 100644
--- a/libgfortran/generated/in_pack_c16.c
+++ b/libgfortran/generated/in_pack_c16.c
@@ -43,7 +43,6 @@ internal_pack_c16 (gfc_array_c16 * source)
const GFC_COMPLEX_16 *src;
GFC_COMPLEX_16 * restrict dest;
GFC_COMPLEX_16 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_c16 (gfc_array_c16 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_c16 (gfc_array_c16 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_c4.c b/libgfortran/generated/in_pack_c4.c
index 4140954..55fdd76 100644
--- a/libgfortran/generated/in_pack_c4.c
+++ b/libgfortran/generated/in_pack_c4.c
@@ -43,7 +43,6 @@ internal_pack_c4 (gfc_array_c4 * source)
const GFC_COMPLEX_4 *src;
GFC_COMPLEX_4 * restrict dest;
GFC_COMPLEX_4 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_c4 (gfc_array_c4 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_c4 (gfc_array_c4 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_c8.c b/libgfortran/generated/in_pack_c8.c
index 6526644..c8d8732 100644
--- a/libgfortran/generated/in_pack_c8.c
+++ b/libgfortran/generated/in_pack_c8.c
@@ -43,7 +43,6 @@ internal_pack_c8 (gfc_array_c8 * source)
const GFC_COMPLEX_8 *src;
GFC_COMPLEX_8 * restrict dest;
GFC_COMPLEX_8 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_c8 (gfc_array_c8 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_c8 (gfc_array_c8 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_i1.c b/libgfortran/generated/in_pack_i1.c
index 1f2d389..83cdead 100644
--- a/libgfortran/generated/in_pack_i1.c
+++ b/libgfortran/generated/in_pack_i1.c
@@ -43,7 +43,6 @@ internal_pack_1 (gfc_array_i1 * source)
const GFC_INTEGER_1 *src;
GFC_INTEGER_1 * restrict dest;
GFC_INTEGER_1 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_1 (gfc_array_i1 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_1 (gfc_array_i1 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_i16.c b/libgfortran/generated/in_pack_i16.c
index 36735ed..746f5c4 100644
--- a/libgfortran/generated/in_pack_i16.c
+++ b/libgfortran/generated/in_pack_i16.c
@@ -43,7 +43,6 @@ internal_pack_16 (gfc_array_i16 * source)
const GFC_INTEGER_16 *src;
GFC_INTEGER_16 * restrict dest;
GFC_INTEGER_16 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_16 (gfc_array_i16 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_16 (gfc_array_i16 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_i2.c b/libgfortran/generated/in_pack_i2.c
index c0aac72..47f6611 100644
--- a/libgfortran/generated/in_pack_i2.c
+++ b/libgfortran/generated/in_pack_i2.c
@@ -43,7 +43,6 @@ internal_pack_2 (gfc_array_i2 * source)
const GFC_INTEGER_2 *src;
GFC_INTEGER_2 * restrict dest;
GFC_INTEGER_2 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_2 (gfc_array_i2 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_2 (gfc_array_i2 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_i4.c b/libgfortran/generated/in_pack_i4.c
index 12fc6e3..dea118b 100644
--- a/libgfortran/generated/in_pack_i4.c
+++ b/libgfortran/generated/in_pack_i4.c
@@ -43,7 +43,6 @@ internal_pack_4 (gfc_array_i4 * source)
const GFC_INTEGER_4 *src;
GFC_INTEGER_4 * restrict dest;
GFC_INTEGER_4 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_4 (gfc_array_i4 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_4 (gfc_array_i4 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_i8.c b/libgfortran/generated/in_pack_i8.c
index 694e5ee..086614b 100644
--- a/libgfortran/generated/in_pack_i8.c
+++ b/libgfortran/generated/in_pack_i8.c
@@ -43,7 +43,6 @@ internal_pack_8 (gfc_array_i8 * source)
const GFC_INTEGER_8 *src;
GFC_INTEGER_8 * restrict dest;
GFC_INTEGER_8 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_8 (gfc_array_i8 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_8 (gfc_array_i8 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_r10.c b/libgfortran/generated/in_pack_r10.c
index f3c8e7b..47fcc3a 100644
--- a/libgfortran/generated/in_pack_r10.c
+++ b/libgfortran/generated/in_pack_r10.c
@@ -43,7 +43,6 @@ internal_pack_r10 (gfc_array_r10 * source)
const GFC_REAL_10 *src;
GFC_REAL_10 * restrict dest;
GFC_REAL_10 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_r10 (gfc_array_r10 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_r10 (gfc_array_r10 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_r16.c b/libgfortran/generated/in_pack_r16.c
index 9405dec..6d51cb4 100644
--- a/libgfortran/generated/in_pack_r16.c
+++ b/libgfortran/generated/in_pack_r16.c
@@ -43,7 +43,6 @@ internal_pack_r16 (gfc_array_r16 * source)
const GFC_REAL_16 *src;
GFC_REAL_16 * restrict dest;
GFC_REAL_16 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_r16 (gfc_array_r16 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_r16 (gfc_array_r16 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_r4.c b/libgfortran/generated/in_pack_r4.c
index 95633f5..6bc1f0f 100644
--- a/libgfortran/generated/in_pack_r4.c
+++ b/libgfortran/generated/in_pack_r4.c
@@ -43,7 +43,6 @@ internal_pack_r4 (gfc_array_r4 * source)
const GFC_REAL_4 *src;
GFC_REAL_4 * restrict dest;
GFC_REAL_4 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_r4 (gfc_array_r4 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_r4 (gfc_array_r4 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_pack_r8.c b/libgfortran/generated/in_pack_r8.c
index c13ad88..bf9acb1 100644
--- a/libgfortran/generated/in_pack_r8.c
+++ b/libgfortran/generated/in_pack_r8.c
@@ -43,7 +43,6 @@ internal_pack_r8 (gfc_array_r8 * source)
const GFC_REAL_8 *src;
GFC_REAL_8 * restrict dest;
GFC_REAL_8 *destptr;
- int n;
int packed;
/* TODO: Investigate how we can figure out if this is a temporary
@@ -52,7 +51,7 @@ internal_pack_r8 (gfc_array_r8 * source)
dim = GFC_DESCRIPTOR_RANK (source);
ssize = 1;
packed = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -88,7 +87,7 @@ internal_pack_r8 (gfc_array_r8 * source)
src += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_c10.c b/libgfortran/generated/in_unpack_c10.c
index 4dfbcb4..b85529c 100644
--- a/libgfortran/generated/in_unpack_c10.c
+++ b/libgfortran/generated/in_unpack_c10.c
@@ -39,7 +39,6 @@ internal_unpack_c10 (gfc_array_c10 * d, const GFC_COMPLEX_10 * src)
index_type dim;
index_type dsize;
GFC_COMPLEX_10 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_c10 (gfc_array_c10 * d, const GFC_COMPLEX_10 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_c10 (gfc_array_c10 * d, const GFC_COMPLEX_10 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_c16.c b/libgfortran/generated/in_unpack_c16.c
index e007ef6..16fd032 100644
--- a/libgfortran/generated/in_unpack_c16.c
+++ b/libgfortran/generated/in_unpack_c16.c
@@ -39,7 +39,6 @@ internal_unpack_c16 (gfc_array_c16 * d, const GFC_COMPLEX_16 * src)
index_type dim;
index_type dsize;
GFC_COMPLEX_16 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_c16 (gfc_array_c16 * d, const GFC_COMPLEX_16 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_c16 (gfc_array_c16 * d, const GFC_COMPLEX_16 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_c4.c b/libgfortran/generated/in_unpack_c4.c
index c5386d5..320dc95 100644
--- a/libgfortran/generated/in_unpack_c4.c
+++ b/libgfortran/generated/in_unpack_c4.c
@@ -39,7 +39,6 @@ internal_unpack_c4 (gfc_array_c4 * d, const GFC_COMPLEX_4 * src)
index_type dim;
index_type dsize;
GFC_COMPLEX_4 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_c4 (gfc_array_c4 * d, const GFC_COMPLEX_4 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_c4 (gfc_array_c4 * d, const GFC_COMPLEX_4 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_c8.c b/libgfortran/generated/in_unpack_c8.c
index 864b2ad..64030e0 100644
--- a/libgfortran/generated/in_unpack_c8.c
+++ b/libgfortran/generated/in_unpack_c8.c
@@ -39,7 +39,6 @@ internal_unpack_c8 (gfc_array_c8 * d, const GFC_COMPLEX_8 * src)
index_type dim;
index_type dsize;
GFC_COMPLEX_8 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_c8 (gfc_array_c8 * d, const GFC_COMPLEX_8 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_c8 (gfc_array_c8 * d, const GFC_COMPLEX_8 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_i1.c b/libgfortran/generated/in_unpack_i1.c
index ba61b49..e96eb69 100644
--- a/libgfortran/generated/in_unpack_i1.c
+++ b/libgfortran/generated/in_unpack_i1.c
@@ -39,7 +39,6 @@ internal_unpack_1 (gfc_array_i1 * d, const GFC_INTEGER_1 * src)
index_type dim;
index_type dsize;
GFC_INTEGER_1 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_1 (gfc_array_i1 * d, const GFC_INTEGER_1 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_1 (gfc_array_i1 * d, const GFC_INTEGER_1 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_i16.c b/libgfortran/generated/in_unpack_i16.c
index 392e4f7..54fe60a 100644
--- a/libgfortran/generated/in_unpack_i16.c
+++ b/libgfortran/generated/in_unpack_i16.c
@@ -39,7 +39,6 @@ internal_unpack_16 (gfc_array_i16 * d, const GFC_INTEGER_16 * src)
index_type dim;
index_type dsize;
GFC_INTEGER_16 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_16 (gfc_array_i16 * d, const GFC_INTEGER_16 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_16 (gfc_array_i16 * d, const GFC_INTEGER_16 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_i2.c b/libgfortran/generated/in_unpack_i2.c
index dd036e5..6d0195d 100644
--- a/libgfortran/generated/in_unpack_i2.c
+++ b/libgfortran/generated/in_unpack_i2.c
@@ -39,7 +39,6 @@ internal_unpack_2 (gfc_array_i2 * d, const GFC_INTEGER_2 * src)
index_type dim;
index_type dsize;
GFC_INTEGER_2 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_2 (gfc_array_i2 * d, const GFC_INTEGER_2 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_2 (gfc_array_i2 * d, const GFC_INTEGER_2 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_i4.c b/libgfortran/generated/in_unpack_i4.c
index 928a695..86102ab 100644
--- a/libgfortran/generated/in_unpack_i4.c
+++ b/libgfortran/generated/in_unpack_i4.c
@@ -39,7 +39,6 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
index_type dim;
index_type dsize;
GFC_INTEGER_4 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_i8.c b/libgfortran/generated/in_unpack_i8.c
index 21ad0c6..e51547d 100644
--- a/libgfortran/generated/in_unpack_i8.c
+++ b/libgfortran/generated/in_unpack_i8.c
@@ -39,7 +39,6 @@ internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src)
index_type dim;
index_type dsize;
GFC_INTEGER_8 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_r10.c b/libgfortran/generated/in_unpack_r10.c
index c937b71..8a301be 100644
--- a/libgfortran/generated/in_unpack_r10.c
+++ b/libgfortran/generated/in_unpack_r10.c
@@ -39,7 +39,6 @@ internal_unpack_r10 (gfc_array_r10 * d, const GFC_REAL_10 * src)
index_type dim;
index_type dsize;
GFC_REAL_10 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_r10 (gfc_array_r10 * d, const GFC_REAL_10 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_r10 (gfc_array_r10 * d, const GFC_REAL_10 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_r16.c b/libgfortran/generated/in_unpack_r16.c
index 1e83ae3..03ecae7 100644
--- a/libgfortran/generated/in_unpack_r16.c
+++ b/libgfortran/generated/in_unpack_r16.c
@@ -39,7 +39,6 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
index_type dim;
index_type dsize;
GFC_REAL_16 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_r4.c b/libgfortran/generated/in_unpack_r4.c
index 7a26323..086cc6a 100644
--- a/libgfortran/generated/in_unpack_r4.c
+++ b/libgfortran/generated/in_unpack_r4.c
@@ -39,7 +39,6 @@ internal_unpack_r4 (gfc_array_r4 * d, const GFC_REAL_4 * src)
index_type dim;
index_type dsize;
GFC_REAL_4 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_r4 (gfc_array_r4 * d, const GFC_REAL_4 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_r4 (gfc_array_r4 * d, const GFC_REAL_4 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/in_unpack_r8.c b/libgfortran/generated/in_unpack_r8.c
index 8805dcc3..d7dd5ea 100644
--- a/libgfortran/generated/in_unpack_r8.c
+++ b/libgfortran/generated/in_unpack_r8.c
@@ -39,7 +39,6 @@ internal_unpack_r8 (gfc_array_r8 * d, const GFC_REAL_8 * src)
index_type dim;
index_type dsize;
GFC_REAL_8 * restrict dest;
- int n;
dest = d->base_addr;
if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_r8 (gfc_array_r8 * d, const GFC_REAL_8 * src)
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
- for (n = 0; n < dim; n++)
+ for (index_type n = 0; n < dim; n++)
{
count[n] = 0;
stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_r8 (gfc_array_r8 * d, const GFC_REAL_8 * src)
dest += stride0;
count[0]++;
/* Advance to the next source element. */
- n = 0;
+ index_type n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
diff --git a/libgfortran/generated/reshape_c10.c b/libgfortran/generated/reshape_c10.c
index 6bf12fd..dbea98d 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -72,8 +72,6 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
const GFC_COMPLEX_10 *pptr;
const GFC_COMPLEX_10 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_c16.c b/libgfortran/generated/reshape_c16.c
index 28e7eeb..4cf875f 100644
--- a/libgfortran/generated/reshape_c16.c
+++ b/libgfortran/generated/reshape_c16.c
@@ -72,8 +72,6 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
const GFC_COMPLEX_16 *pptr;
const GFC_COMPLEX_16 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c
index 15997a0..da718ad 100644
--- a/libgfortran/generated/reshape_c4.c
+++ b/libgfortran/generated/reshape_c4.c
@@ -72,8 +72,6 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
const GFC_COMPLEX_4 *pptr;
const GFC_COMPLEX_4 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c
index be5457f..9fa7aca 100644
--- a/libgfortran/generated/reshape_c8.c
+++ b/libgfortran/generated/reshape_c8.c
@@ -72,8 +72,6 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
const GFC_COMPLEX_8 *pptr;
const GFC_COMPLEX_8 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_i16.c b/libgfortran/generated/reshape_i16.c
index 3d4d516..8d3e218 100644
--- a/libgfortran/generated/reshape_i16.c
+++ b/libgfortran/generated/reshape_i16.c
@@ -72,8 +72,6 @@ reshape_16 (gfc_array_i16 * const restrict ret,
const GFC_INTEGER_16 *pptr;
const GFC_INTEGER_16 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_16 (gfc_array_i16 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_16 (gfc_array_i16 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c
index 64fae81..d534852 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -72,8 +72,6 @@ reshape_4 (gfc_array_i4 * const restrict ret,
const GFC_INTEGER_4 *pptr;
const GFC_INTEGER_4 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_4 (gfc_array_i4 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_4 (gfc_array_i4 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c
index aa675a7..205d45e 100644
--- a/libgfortran/generated/reshape_i8.c
+++ b/libgfortran/generated/reshape_i8.c
@@ -72,8 +72,6 @@ reshape_8 (gfc_array_i8 * const restrict ret,
const GFC_INTEGER_8 *pptr;
const GFC_INTEGER_8 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_8 (gfc_array_i8 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_8 (gfc_array_i8 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_r10.c b/libgfortran/generated/reshape_r10.c
index 2feac5a..15e68f1 100644
--- a/libgfortran/generated/reshape_r10.c
+++ b/libgfortran/generated/reshape_r10.c
@@ -72,8 +72,6 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
const GFC_REAL_10 *pptr;
const GFC_REAL_10 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_r16.c b/libgfortran/generated/reshape_r16.c
index bbfd2ad..4e17d31 100644
--- a/libgfortran/generated/reshape_r16.c
+++ b/libgfortran/generated/reshape_r16.c
@@ -72,8 +72,6 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
const GFC_REAL_16 *pptr;
const GFC_REAL_16 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_r4.c b/libgfortran/generated/reshape_r4.c
index b0f27dc..7f419b1 100644
--- a/libgfortran/generated/reshape_r4.c
+++ b/libgfortran/generated/reshape_r4.c
@@ -72,8 +72,6 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
const GFC_REAL_4 *pptr;
const GFC_REAL_4 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/reshape_r8.c b/libgfortran/generated/reshape_r8.c
index bd0d2bc..0315b0b 100644
--- a/libgfortran/generated/reshape_r8.c
+++ b/libgfortran/generated/reshape_r8.c
@@ -72,8 +72,6 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
const GFC_REAL_8 *pptr;
const GFC_REAL_8 *src;
- int n;
- int dim;
int sempty, pempty, shape_empty;
index_type shape_data[GFC_MAX_DIMENSIONS];
@@ -87,7 +85,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
shape_empty = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
if (shape_data[n] <= 0)
@@ -102,7 +100,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
index_type alloc_size;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rex = shape_data[n];
@@ -129,7 +127,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
pdim = GFC_DESCRIPTOR_RANK (pad);
psize = 1;
pempty = 0;
- for (n = 0; n < pdim; n++)
+ for (index_type n = 0; n < pdim; n++)
{
pcount[n] = 0;
pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
@@ -160,7 +158,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
index_type ret_extent, source_extent;
rs = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
rs *= shape_data[n];
ret_extent = GFC_DESCRIPTOR_EXTENT(ret,n);
@@ -173,7 +171,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
source_extent = 1;
sdim = GFC_DESCRIPTOR_RANK (source);
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
index_type se;
se = GFC_DESCRIPTOR_EXTENT(source,n);
@@ -190,10 +188,10 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
int seen[GFC_MAX_DIMENSIONS];
index_type v;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
seen[n] = 0;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
@@ -211,8 +209,9 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
}
rsize = 1;
- for (n = 0; n < rdim; n++)
+ for (index_type n = 0; n < rdim; n++)
{
+ index_type dim;
if (order)
dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
else
@@ -243,7 +242,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
ssize = 1;
sempty = 0;
- for (n = 0; n < sdim; n++)
+ for (index_type n = 0; n < sdim; n++)
{
scount[n] = 0;
sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
@@ -283,7 +282,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
src = pptr;
sptr = pptr;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
@@ -303,7 +302,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
scount[0]++;
/* Advance to the next destination element. */
- n = 0;
+ index_type n = 0;
while (rcount[n] == rextent[n])
{
/* When we get to the end of a dimension, reset it and increment
@@ -343,7 +342,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
/* Switch to the pad array. */
sptr = NULL;
sdim = pdim;
- for (dim = 0; dim < pdim; dim++)
+ for (index_type dim = 0; dim < pdim; dim++)
{
scount[dim] = pcount[dim];
sextent[dim] = pextent[dim];
diff --git a/libgfortran/generated/shape_i1.c b/libgfortran/generated/shape_i1.c
index c0e0e6a..c500222 100644
--- a/libgfortran/generated/shape_i1.c
+++ b/libgfortran/generated/shape_i1.c
@@ -36,12 +36,10 @@ void
shape_1 (gfc_array_i1 * const restrict ret,
const array_t * const restrict array)
{
- int n;
index_type stride;
index_type extent;
- int rank;
- rank = GFC_DESCRIPTOR_RANK (array);
+ int rank = GFC_DESCRIPTOR_RANK (array);
if (ret->base_addr == NULL)
{
@@ -55,7 +53,7 @@ shape_1 (gfc_array_i1 * const restrict ret,
if (GFC_DESCRIPTOR_EXTENT(ret,0) < 1)
return;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
extent = GFC_DESCRIPTOR_EXTENT(array,n);
ret->base_addr[n * stride] = extent > 0 ? extent : 0 ;
diff --git a/libgfortran/generated/shape_i16.c b/libgfortran/generated/shape_i16.c
index 89abddf..5b1498f 100644
--- a/libgfortran/generated/shape_i16.c
+++ b/libgfortran/generated/shape_i16.c
@@ -36,12 +36,10 @@ void
shape_16 (gfc_array_i16 * const restrict ret,
const array_t * const restrict array)
{
- int n;
index_type stride;
index_type extent;
- int rank;
- rank = GFC_DESCRIPTOR_RANK (array);
+ int rank = GFC_DESCRIPTOR_RANK (array);
if (ret->base_addr == NULL)
{
@@ -55,7 +53,7 @@ shape_16 (gfc_array_i16 * const restrict ret,
if (GFC_DESCRIPTOR_EXTENT(ret,0) < 1)
return;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
extent = GFC_DESCRIPTOR_EXTENT(array,n);
ret->base_addr[n * stride] = extent > 0 ? extent : 0 ;
diff --git a/libgfortran/generated/shape_i2.c b/libgfortran/generated/shape_i2.c
index 15ee5db..d9536c7 100644
--- a/libgfortran/generated/shape_i2.c
+++ b/libgfortran/generated/shape_i2.c
@@ -36,12 +36,10 @@ void
shape_2 (gfc_array_i2 * const restrict ret,
const array_t * const restrict array)
{
- int n;
index_type stride;
index_type extent;
- int rank;
- rank = GFC_DESCRIPTOR_RANK (array);
+ int rank = GFC_DESCRIPTOR_RANK (array);
if (ret->base_addr == NULL)
{
@@ -55,7 +53,7 @@ shape_2 (gfc_array_i2 * const restrict ret,
if (GFC_DESCRIPTOR_EXTENT(ret,0) < 1)
return;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
extent = GFC_DESCRIPTOR_EXTENT(array,n);
ret->base_addr[n * stride] = extent > 0 ? extent : 0 ;
diff --git a/libgfortran/generated/shape_i4.c b/libgfortran/generated/shape_i4.c
index e054318..798d0fe 100644
--- a/libgfortran/generated/shape_i4.c
+++ b/libgfortran/generated/shape_i4.c
@@ -36,12 +36,10 @@ void
shape_4 (gfc_array_i4 * const restrict ret,
const array_t * const restrict array)
{
- int n;
index_type stride;
index_type extent;
- int rank;
- rank = GFC_DESCRIPTOR_RANK (array);
+ int rank = GFC_DESCRIPTOR_RANK (array);
if (ret->base_addr == NULL)
{
@@ -55,7 +53,7 @@ shape_4 (gfc_array_i4 * const restrict ret,
if (GFC_DESCRIPTOR_EXTENT(ret,0) < 1)
return;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
extent = GFC_DESCRIPTOR_EXTENT(array,n);
ret->base_addr[n * stride] = extent > 0 ? extent : 0 ;
diff --git a/libgfortran/generated/shape_i8.c b/libgfortran/generated/shape_i8.c
index a491fed..d885d82 100644
--- a/libgfortran/generated/shape_i8.c
+++ b/libgfortran/generated/shape_i8.c
@@ -36,12 +36,10 @@ void
shape_8 (gfc_array_i8 * const restrict ret,
const array_t * const restrict array)
{
- int n;
index_type stride;
index_type extent;
- int rank;
- rank = GFC_DESCRIPTOR_RANK (array);
+ int rank = GFC_DESCRIPTOR_RANK (array);
if (ret->base_addr == NULL)
{
@@ -55,7 +53,7 @@ shape_8 (gfc_array_i8 * const restrict ret,
if (GFC_DESCRIPTOR_EXTENT(ret,0) < 1)
return;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
extent = GFC_DESCRIPTOR_EXTENT(array,n);
ret->base_addr[n * stride] = extent > 0 ? extent : 0 ;
diff --git a/libgfortran/generated/spread_c10.c b/libgfortran/generated/spread_c10.c
index 70aa950..fdde4c4 100644
--- a/libgfortran/generated/spread_c10.c
+++ b/libgfortran/generated/spread_c10.c
@@ -227,10 +227,8 @@ spread_c10 (gfc_array_c10 *ret, const gfc_array_c10 *source,
void
spread_scalar_c10 (gfc_array_c10 *ret, const GFC_COMPLEX_10 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_COMPLEX_10 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_c10 (gfc_array_c10 *ret, const GFC_COMPLEX_10 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_c16.c b/libgfortran/generated/spread_c16.c
index 9a284a1..a6cb709 100644
--- a/libgfortran/generated/spread_c16.c
+++ b/libgfortran/generated/spread_c16.c
@@ -227,10 +227,8 @@ spread_c16 (gfc_array_c16 *ret, const gfc_array_c16 *source,
void
spread_scalar_c16 (gfc_array_c16 *ret, const GFC_COMPLEX_16 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_COMPLEX_16 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_c16 (gfc_array_c16 *ret, const GFC_COMPLEX_16 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_c4.c b/libgfortran/generated/spread_c4.c
index dbb12d5..b9b75f1 100644
--- a/libgfortran/generated/spread_c4.c
+++ b/libgfortran/generated/spread_c4.c
@@ -227,10 +227,8 @@ spread_c4 (gfc_array_c4 *ret, const gfc_array_c4 *source,
void
spread_scalar_c4 (gfc_array_c4 *ret, const GFC_COMPLEX_4 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_COMPLEX_4 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_c4 (gfc_array_c4 *ret, const GFC_COMPLEX_4 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_c8.c b/libgfortran/generated/spread_c8.c
index 09f371f..2d1dbca 100644
--- a/libgfortran/generated/spread_c8.c
+++ b/libgfortran/generated/spread_c8.c
@@ -227,10 +227,8 @@ spread_c8 (gfc_array_c8 *ret, const gfc_array_c8 *source,
void
spread_scalar_c8 (gfc_array_c8 *ret, const GFC_COMPLEX_8 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_COMPLEX_8 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_c8 (gfc_array_c8 *ret, const GFC_COMPLEX_8 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_i1.c b/libgfortran/generated/spread_i1.c
index 6c56bfc..f06fd50 100644
--- a/libgfortran/generated/spread_i1.c
+++ b/libgfortran/generated/spread_i1.c
@@ -227,10 +227,8 @@ spread_i1 (gfc_array_i1 *ret, const gfc_array_i1 *source,
void
spread_scalar_i1 (gfc_array_i1 *ret, const GFC_INTEGER_1 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_INTEGER_1 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_i1 (gfc_array_i1 *ret, const GFC_INTEGER_1 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_i16.c b/libgfortran/generated/spread_i16.c
index a00ed75..19f15d7 100644
--- a/libgfortran/generated/spread_i16.c
+++ b/libgfortran/generated/spread_i16.c
@@ -227,10 +227,8 @@ spread_i16 (gfc_array_i16 *ret, const gfc_array_i16 *source,
void
spread_scalar_i16 (gfc_array_i16 *ret, const GFC_INTEGER_16 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_INTEGER_16 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_i16 (gfc_array_i16 *ret, const GFC_INTEGER_16 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_i2.c b/libgfortran/generated/spread_i2.c
index f48d66e..eeb2899 100644
--- a/libgfortran/generated/spread_i2.c
+++ b/libgfortran/generated/spread_i2.c
@@ -227,10 +227,8 @@ spread_i2 (gfc_array_i2 *ret, const gfc_array_i2 *source,
void
spread_scalar_i2 (gfc_array_i2 *ret, const GFC_INTEGER_2 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_INTEGER_2 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_i2 (gfc_array_i2 *ret, const GFC_INTEGER_2 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_i4.c b/libgfortran/generated/spread_i4.c
index 5703cd6..463e153 100644
--- a/libgfortran/generated/spread_i4.c
+++ b/libgfortran/generated/spread_i4.c
@@ -227,10 +227,8 @@ spread_i4 (gfc_array_i4 *ret, const gfc_array_i4 *source,
void
spread_scalar_i4 (gfc_array_i4 *ret, const GFC_INTEGER_4 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_INTEGER_4 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_i4 (gfc_array_i4 *ret, const GFC_INTEGER_4 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_i8.c b/libgfortran/generated/spread_i8.c
index 25465a1..fe41681 100644
--- a/libgfortran/generated/spread_i8.c
+++ b/libgfortran/generated/spread_i8.c
@@ -227,10 +227,8 @@ spread_i8 (gfc_array_i8 *ret, const gfc_array_i8 *source,
void
spread_scalar_i8 (gfc_array_i8 *ret, const GFC_INTEGER_8 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_INTEGER_8 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_i8 (gfc_array_i8 *ret, const GFC_INTEGER_8 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_r10.c b/libgfortran/generated/spread_r10.c
index 5f9b021..4aec65d 100644
--- a/libgfortran/generated/spread_r10.c
+++ b/libgfortran/generated/spread_r10.c
@@ -227,10 +227,8 @@ spread_r10 (gfc_array_r10 *ret, const gfc_array_r10 *source,
void
spread_scalar_r10 (gfc_array_r10 *ret, const GFC_REAL_10 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_REAL_10 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_r10 (gfc_array_r10 *ret, const GFC_REAL_10 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_r16.c b/libgfortran/generated/spread_r16.c
index df0007f..8e1e9c7 100644
--- a/libgfortran/generated/spread_r16.c
+++ b/libgfortran/generated/spread_r16.c
@@ -227,10 +227,8 @@ spread_r16 (gfc_array_r16 *ret, const gfc_array_r16 *source,
void
spread_scalar_r16 (gfc_array_r16 *ret, const GFC_REAL_16 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_REAL_16 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_r16 (gfc_array_r16 *ret, const GFC_REAL_16 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_r4.c b/libgfortran/generated/spread_r4.c
index e64bf71..431452f 100644
--- a/libgfortran/generated/spread_r4.c
+++ b/libgfortran/generated/spread_r4.c
@@ -227,10 +227,8 @@ spread_r4 (gfc_array_r4 *ret, const gfc_array_r4 *source,
void
spread_scalar_r4 (gfc_array_r4 *ret, const GFC_REAL_4 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_REAL_4 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_r4 (gfc_array_r4 *ret, const GFC_REAL_4 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;
diff --git a/libgfortran/generated/spread_r8.c b/libgfortran/generated/spread_r8.c
index ca5b2f2..d89c8d2 100644
--- a/libgfortran/generated/spread_r8.c
+++ b/libgfortran/generated/spread_r8.c
@@ -227,10 +227,8 @@ spread_r8 (gfc_array_r8 *ret, const gfc_array_r8 *source,
void
spread_scalar_r8 (gfc_array_r8 *ret, const GFC_REAL_8 *source,
- const index_type along, const index_type pncopies)
+ const index_type along, const index_type ncopies)
{
- int n;
- int ncopies = pncopies;
GFC_REAL_8 * restrict dest;
index_type stride;
@@ -256,7 +254,7 @@ spread_scalar_r8 (gfc_array_r8 *ret, const GFC_REAL_8 *source,
dest = ret->base_addr;
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
- for (n = 0; n < ncopies; n++)
+ for (index_type n = 0; n < ncopies; n++)
{
*dest = *source;
dest += stride;