summaryrefslogtreecommitdiff
path: root/libgfortran/generated/minval_i16.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/minval_i16.c')
-rw-r--r--libgfortran/generated/minval_i16.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c
index e286a77a7c9..7c877b2b784 100644
--- a/libgfortran/generated/minval_i16.c
+++ b/libgfortran/generated/minval_i16.c
@@ -60,11 +60,11 @@ minval_i16 (gfc_array_i16 * const restrict retarray,
len = GFC_DESCRIPTOR_EXTENT(array,dim);
if (len < 0)
len = 0;
- delta = GFC_DESCRIPTOR_STRIDE(array,dim);
+ delta = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array,dim);
for (n = 0; n < dim; n++)
{
- sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
+ sstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array,n);
extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
if (extent[n] < 0)
@@ -72,7 +72,7 @@ minval_i16 (gfc_array_i16 * const restrict retarray,
}
for (n = dim; n < rank; n++)
{
- sstride[n] = GFC_DESCRIPTOR_STRIDE(array, n + 1);
+ sstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array, n + 1);
extent[n] = GFC_DESCRIPTOR_EXTENT(array, n + 1);
if (extent[n] < 0)
@@ -81,23 +81,24 @@ minval_i16 (gfc_array_i16 * const restrict retarray,
if (retarray->base_addr == NULL)
{
- size_t alloc_size, str;
+ size_t alloc_size, sm;
for (n = 0; n < rank; n++)
{
if (n == 0)
- str = 1;
+ sm = sizeof (GFC_INTEGER_16);
else
- str = GFC_DESCRIPTOR_STRIDE(retarray,n-1) * extent[n-1];
+ sm = GFC_DESCRIPTOR_SM (retarray,n-1) * extent[n-1];
- GFC_DIMENSION_SET(retarray->dim[n], 0, extent[n] - 1, str);
+ GFC_DIMENSION_SET (retarray->dim[n], 0, extent[n], sm);
}
retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+ retarray->elem_len = array->elem_len;
+ retarray->type = array->type;
- alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_SM (retarray, rank-1) * extent[rank-1];
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
@@ -124,7 +125,7 @@ minval_i16 (gfc_array_i16 * const restrict retarray,
for (n = 0; n < rank; n++)
{
count[n] = 0;
- dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n);
+ dstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(retarray,n);
if (extent[n] <= 0)
return;
}
@@ -236,7 +237,7 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
mbase = mask->base_addr;
- mask_kind = GFC_DESCRIPTOR_SIZE (mask);
+ mask_kind = GFC_DESCRIPTOR_ELEM_LEN (mask);
if (mask_kind == 1 || mask_kind == 2 || mask_kind == 4 || mask_kind == 8
#ifdef HAVE_GFC_LOGICAL_16
@@ -247,13 +248,13 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
else
runtime_error ("Funny sized logical array");
- delta = GFC_DESCRIPTOR_STRIDE(array,dim);
- mdelta = GFC_DESCRIPTOR_STRIDE_BYTES(mask,dim);
+ delta = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array,dim);
+ mdelta = GFC_DESCRIPTOR_SM(mask,dim);
for (n = 0; n < dim; n++)
{
- sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ sstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array,n);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask,n);
extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
if (extent[n] < 0)
@@ -262,8 +263,8 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
}
for (n = dim; n < rank; n++)
{
- sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n + 1);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask, n + 1);
+ sstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(array,n + 1);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask, n + 1);
extent[n] = GFC_DESCRIPTOR_EXTENT(array, n + 1);
if (extent[n] < 0)
@@ -272,23 +273,24 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
if (retarray->base_addr == NULL)
{
- size_t alloc_size, str;
+ size_t alloc_size, sm ;
for (n = 0; n < rank; n++)
{
if (n == 0)
- str = 1;
+ sm = sizeof (GFC_INTEGER_16);
else
- str= GFC_DESCRIPTOR_STRIDE(retarray,n-1) * extent[n-1];
+ sm = GFC_DESCRIPTOR_SM (retarray, n-1) * extent[n-1];
- GFC_DIMENSION_SET(retarray->dim[n], 0, extent[n] - 1, str);
+ GFC_DIMENSION_SET (retarray->dim[n], 0, extent[n], sm);
}
- alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_SM (retarray, rank-1) * extent[rank-1];
retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
+ retarray->elem_len = array->elem_len;
+ retarray->type = array->type;
if (alloc_size == 0)
{
@@ -317,7 +319,7 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
for (n = 0; n < rank; n++)
{
count[n] = 0;
- dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n);
+ dstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(retarray,n);
if (extent[n] <= 0)
return;
}
@@ -454,23 +456,23 @@ sminval_i16 (gfc_array_i16 * const restrict retarray,
if (retarray->base_addr == NULL)
{
- size_t alloc_size, str;
+ size_t alloc_size, sm;
for (n = 0; n < rank; n++)
{
if (n == 0)
- str = 1;
+ sm = sizeof (GFC_INTEGER_16);
else
- str = GFC_DESCRIPTOR_STRIDE(retarray,n-1) * extent[n-1];
-
- GFC_DIMENSION_SET(retarray->dim[n], 0, extent[n] - 1, str);
+ sm = GFC_DESCRIPTOR_SM (retarray,n-1) * extent[n-1];
+ GFC_DIMENSION_SET (retarray->dim[n], 0, extent[n], sm);
}
+ retarray->elem_len = array->elem_len;
+ retarray->type = array->type;
retarray->offset = 0;
- retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_SM (retarray, rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -508,7 +510,7 @@ sminval_i16 (gfc_array_i16 * const restrict retarray,
for (n = 0; n < rank; n++)
{
count[n] = 0;
- dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n);
+ dstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(retarray,n);
}
dest = retarray->base_addr;