summaryrefslogtreecommitdiff
path: root/libgfortran/generated/reshape_i4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/reshape_i4.c')
-rw-r--r--libgfortran/generated/reshape_i4.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c
index 2b39c554088..b33a9e1f64c 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_INTEGER_4)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef CFI_CDESC_TYPE_T(1, index_type) shape_type;
extern void reshape_4 (gfc_array_i4 * const restrict,
@@ -87,7 +87,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
for (n = 0; n < rdim; n++)
{
- shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE(shape,0)];
+ shape_data[n] = shape->base_addr[n * GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(shape,0)];
if (shape_data[n] <= 0)
{
shape_data[n] = 0;
@@ -99,12 +99,12 @@ reshape_4 (gfc_array_i4 * const restrict ret,
{
index_type alloc_size;
- rs = 1;
+ rs = sizeof (GFC_INTEGER_4);
for (n = 0; n < rdim; n++)
{
rex = shape_data[n];
- GFC_DIMENSION_SET(ret->dim[n], 0, rex - 1, rs);
+ GFC_DIMENSION_SET(ret->dim[n], 0, rex, rs);
rs *= rex;
}
@@ -116,7 +116,8 @@ reshape_4 (gfc_array_i4 * const restrict ret,
alloc_size = rs;
ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
- ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
+ ret->elem_len = source->elem_len;
+ ret->type = source->type;
}
if (shape_empty)
@@ -130,7 +131,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
for (n = 0; n < pdim; n++)
{
pcount[n] = 0;
- pstride[n] = GFC_DESCRIPTOR_STRIDE(pad,n);
+ pstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(pad,n);
pextent[n] = GFC_DESCRIPTOR_EXTENT(pad,n);
if (pextent[n] <= 0)
{
@@ -193,7 +194,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
for (n = 0; n < rdim; n++)
{
- v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
+ v = order->base_addr[n * GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(order,0)] - 1;
if (v < 0 || v >= rdim)
runtime_error("Value %ld out of range in ORDER argument"
@@ -212,12 +213,12 @@ reshape_4 (gfc_array_i4 * const restrict ret,
for (n = 0; n < rdim; n++)
{
if (order)
- dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE(order,0)] - 1;
+ dim = order->base_addr[n * GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(order,0)] - 1;
else
dim = n;
rcount[n] = 0;
- rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,dim);
+ rstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(ret,dim);
rextent[n] = GFC_DESCRIPTOR_EXTENT(ret,dim);
if (rextent[n] < 0)
rextent[n] = 0;
@@ -239,7 +240,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
for (n = 0; n < sdim; n++)
{
scount[n] = 0;
- sstride[n] = GFC_DESCRIPTOR_STRIDE(source,n);
+ sstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(source,n);
sextent[n] = GFC_DESCRIPTOR_EXTENT(source,n);
if (sextent[n] <= 0)
{