summaryrefslogtreecommitdiff
path: root/libgfortran/generated/iall_i1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/iall_i1.c')
-rw-r--r--libgfortran/generated/iall_i1.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c
index ac36bac1369..da0ce4d22fb 100644
--- a/libgfortran/generated/iall_i1.c
+++ b/libgfortran/generated/iall_i1.c
@@ -97,10 +97,9 @@ iall_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * 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_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * 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;
@@ -285,7 +283,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -430,8 +428,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{