aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgfortran/m4/ifunction_logical.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libgfortran/m4/ifunction_logical.m4')
-rw-r--r--gcc-4.9/libgfortran/m4/ifunction_logical.m45
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc-4.9/libgfortran/m4/ifunction_logical.m4 b/gcc-4.9/libgfortran/m4/ifunction_logical.m4
index 13dd7a928..fd3afb074 100644
--- a/gcc-4.9/libgfortran/m4/ifunction_logical.m4
+++ b/gcc-4.9/libgfortran/m4/ifunction_logical.m4
@@ -89,8 +89,7 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -99,7 +98,7 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
}
else
{