summaryrefslogtreecommitdiff
path: root/libgfortran/generated/minloc0_16_r16.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/minloc0_16_r16.c')
-rw-r--r--libgfortran/generated/minloc0_16_r16.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c
index 75a9df5faa5..1d29e07f297 100644
--- a/libgfortran/generated/minloc0_16_r16.c
+++ b/libgfortran/generated/minloc0_16_r16.c
@@ -55,9 +55,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray,
if (retarray->data == NULL)
{
- retarray->dim[0].lbound = 0;
- retarray->dim[0].ubound = rank-1;
- retarray->dim[0].stride = 1;
+ GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
@@ -74,7 +72,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray,
runtime_error ("rank of return array in MINLOC intrinsic"
" should be 1, is %ld", (long int) ret_rank);
- ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
+ ret_extent = GFC_DESCRIPTOR_EXTENT(retarray,0);
if (ret_extent != rank)
runtime_error ("Incorrect extent in return value of"
" MINLOC intrnisic: is %ld, should be %ld",
@@ -82,12 +80,12 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray,
}
}
- dstride = retarray->dim[0].stride;
+ dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
dest = retarray->data;
for (n = 0; n < rank; n++)
{
- sstride[n] = array->dim[n].stride;
- extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
+ sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
+ extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
count[n] = 0;
if (extent[n] <= 0)
{
@@ -179,9 +177,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
if (retarray->data == NULL)
{
- retarray->dim[0].lbound = 0;
- retarray->dim[0].ubound = rank-1;
- retarray->dim[0].stride = 1;
+ GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
@@ -200,7 +196,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
runtime_error ("rank of return array in MINLOC intrinsic"
" should be 1, is %ld", (long int) ret_rank);
- ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
+ ret_extent = GFC_DESCRIPTOR_EXTENT(retarray,0);
if (ret_extent != rank)
runtime_error ("Incorrect extent in return value of"
" MINLOC intrnisic: is %ld, should be %ld",
@@ -214,8 +210,8 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
for (n=0; n<rank; n++)
{
- array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
- mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
+ array_extent = GFC_DESCRIPTOR_EXTENT(array,n);
+ mask_extent = GFC_DESCRIPTOR_EXTENT(mask,n);
if (array_extent != mask_extent)
runtime_error ("Incorrect extent in MASK argument of"
" MINLOC intrinsic in dimension %ld:"
@@ -238,13 +234,13 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
else
runtime_error ("Funny sized logical array");
- dstride = retarray->dim[0].stride;
+ dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
dest = retarray->data;
for (n = 0; n < rank; n++)
{
- sstride[n] = array->dim[n].stride;
- mstride[n] = mask->dim[n].stride * mask_kind;
- extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
+ sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
+ mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
+ extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
count[n] = 0;
if (extent[n] <= 0)
{
@@ -339,9 +335,7 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
if (retarray->data == NULL)
{
- retarray->dim[0].lbound = 0;
- retarray->dim[0].ubound = rank-1;
- retarray->dim[0].stride = 1;
+ GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
retarray->data = internal_malloc_size (sizeof (GFC_INTEGER_16) * rank);
@@ -358,13 +352,13 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
runtime_error ("rank of return array in MINLOC intrinsic"
" should be 1, is %ld", (long int) ret_rank);
- ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
+ ret_extent = GFC_DESCRIPTOR_EXTENT(retarray,0);
if (ret_extent != rank)
runtime_error ("dimension of return array incorrect");
}
}
- dstride = retarray->dim[0].stride;
+ dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
dest = retarray->data;
for (n = 0; n<rank; n++)
dest[n * dstride] = 0 ;