aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgfortran/generated/reshape_c16.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libgfortran/generated/reshape_c16.c')
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_c16.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc-4.9/libgfortran/generated/reshape_c16.c b/gcc-4.9/libgfortran/generated/reshape_c16.c
index c374af888..a8186f98d 100644
--- a/gcc-4.9/libgfortran/generated/reshape_c16.c
+++ b/gcc-4.9/libgfortran/generated/reshape_c16.c
@@ -111,11 +111,11 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
ret->offset = 0;
if (unlikely (rs < 1))
- alloc_size = 1;
+ alloc_size = 0;
else
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
+ alloc_size = rs;
- ret->base_addr = xmalloc (alloc_size);
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
}