summaryrefslogtreecommitdiff
path: root/libgfortran/generated/unpack_c4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/unpack_c4.c')
-rw-r--r--libgfortran/generated/unpack_c4.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/libgfortran/generated/unpack_c4.c b/libgfortran/generated/unpack_c4.c
index c8b30f5e6d6..4bfe5f750ee 100644
--- a/libgfortran/generated/unpack_c4.c
+++ b/libgfortran/generated/unpack_c4.c
@@ -66,7 +66,7 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
/* Use the same loop for all logical types, by using GFC_LOGICAL_1
and using shifting to address size and endian issues. */
- 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
@@ -91,11 +91,12 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
{
count[n] = 0;
GFC_DIMENSION_SET(ret->dim[n], 0,
- GFC_DESCRIPTOR_EXTENT(mask,n) - 1, rs);
+ GFC_DESCRIPTOR_EXTENT(mask,n),
+ rs * sizeof (GFC_COMPLEX_4));
extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ rstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(ret,n);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask,n);
rs *= extent[n];
}
ret->offset = 0;
@@ -109,8 +110,8 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
count[n] = 0;
extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ rstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(ret,n);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask,n);
}
if (rstride[0] == 0)
rstride[0] = 1;
@@ -122,7 +123,7 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
if (mstride[0] == 0)
mstride[0] = 1;
- vstride0 = GFC_DESCRIPTOR_STRIDE(vector,0);
+ vstride0 = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(vector,0);
if (vstride0 == 0)
vstride0 = 1;
rstride0 = rstride[0];
@@ -210,7 +211,7 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
/* Use the same loop for all logical types, by using GFC_LOGICAL_1
and using shifting to address size and endian issues. */
- 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
@@ -235,12 +236,13 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
{
count[n] = 0;
GFC_DIMENSION_SET(ret->dim[n], 0,
- GFC_DESCRIPTOR_EXTENT(mask,n) - 1, rs);
+ GFC_DESCRIPTOR_EXTENT(mask,n),
+ rs * sizeof (GFC_COMPLEX_4));
extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
- fstride[n] = GFC_DESCRIPTOR_STRIDE(field,n);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ rstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(ret,n);
+ fstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(field,n);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask,n);
rs *= extent[n];
}
ret->offset = 0;
@@ -254,9 +256,9 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
count[n] = 0;
extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
- fstride[n] = GFC_DESCRIPTOR_STRIDE(field,n);
- mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ rstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(ret,n);
+ fstride[n] = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(field,n);
+ mstride[n] = GFC_DESCRIPTOR_SM(mask,n);
}
if (rstride[0] == 0)
rstride[0] = 1;
@@ -270,7 +272,7 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector,
if (mstride[0] == 0)
mstride[0] = 1;
- vstride0 = GFC_DESCRIPTOR_STRIDE(vector,0);
+ vstride0 = GFC_DESCRIPTOR_STRIDE_TYPEKNOWN(vector,0);
if (vstride0 == 0)
vstride0 = 1;
rstride0 = rstride[0];