diff options
Diffstat (limited to 'libgfortran/generated/unpack_i16.c')
-rw-r--r-- | libgfortran/generated/unpack_i16.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/libgfortran/generated/unpack_i16.c b/libgfortran/generated/unpack_i16.c index f62548142db..fc46244ccc5 100644 --- a/libgfortran/generated/unpack_i16.c +++ b/libgfortran/generated/unpack_i16.c @@ -66,7 +66,7 @@ unpack0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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_INTEGER_16)); 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; @@ -111,8 +112,8 @@ unpack0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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; @@ -124,7 +125,7 @@ unpack0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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]; @@ -212,7 +213,7 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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 @@ -237,12 +238,13 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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_INTEGER_16)); 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; @@ -258,9 +260,9 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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; @@ -274,7 +276,7 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *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]; |