summaryrefslogtreecommitdiff
path: root/libgfortran/generated/norm2_r16.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/norm2_r16.c')
-rw-r--r--libgfortran/generated/norm2_r16.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libgfortran/generated/norm2_r16.c b/libgfortran/generated/norm2_r16.c
index 46329d52329..da4445a35d2 100644
--- a/libgfortran/generated/norm2_r16.c
+++ b/libgfortran/generated/norm2_r16.c
@@ -68,11 +68,11 @@ norm2_r16 (gfc_array_r16 * 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)
@@ -80,7 +80,7 @@ norm2_r16 (gfc_array_r16 * 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)
@@ -89,23 +89,24 @@ norm2_r16 (gfc_array_r16 * 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_REAL_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_REAL_16));
if (alloc_size == 0)
@@ -132,7 +133,7 @@ norm2_r16 (gfc_array_r16 * 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;
}