diff options
Diffstat (limited to 'libgfortran/generated/maxloc0_4_r4.c')
-rw-r--r-- | libgfortran/generated/maxloc0_4_r4.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c index fe4b1408053..50f3c3b6d1a 100644 --- a/libgfortran/generated/maxloc0_4_r4.c +++ b/libgfortran/generated/maxloc0_4_r4.c @@ -55,9 +55,7 @@ maxloc0_4_r4 (gfc_array_i4 * 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_4) * rank); @@ -74,7 +72,7 @@ maxloc0_4_r4 (gfc_array_i4 * const restrict retarray, runtime_error ("rank of return array in MAXLOC 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" " MAXLOC intrnisic: is %ld, should be %ld", @@ -82,12 +80,12 @@ maxloc0_4_r4 (gfc_array_i4 * 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 @@ mmaxloc0_4_r4 (gfc_array_i4 * 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_4) * rank); @@ -200,7 +196,7 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, runtime_error ("rank of return array in MAXLOC 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" " MAXLOC intrnisic: is %ld, should be %ld", @@ -214,8 +210,8 @@ mmaxloc0_4_r4 (gfc_array_i4 * 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" " MAXLOC intrinsic in dimension %ld:" @@ -238,13 +234,13 @@ mmaxloc0_4_r4 (gfc_array_i4 * 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 @@ smaxloc0_4_r4 (gfc_array_i4 * 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_4) * rank); @@ -358,13 +352,13 @@ smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, runtime_error ("rank of return array in MAXLOC 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 ; |