summaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxloc1_16_i4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxloc1_16_i4.c')
-rw-r--r--libgfortran/generated/maxloc1_16_i4.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c
index 35fcc2a25f1..c680351674d 100644
--- a/libgfortran/generated/maxloc1_16_i4.c
+++ b/libgfortran/generated/maxloc1_16_i4.c
@@ -98,10 +98,9 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{