sse4_1-roundps-1.c: Remove ASM_SUFFIX define.
[gcc.git] / libgfortran / generated / reshape_r10.c
index cee37af854bc5c812802ed6cb88caf2ddf1a720e..409c47640f1b8920df443a444e5aabbcee470df0 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the RESHAPE intrinsic
-   Copyright (C) 2002-2013 Free Software Foundation, Inc.
+   Copyright (C) 2002-2015 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -111,11 +111,11 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
       ret->offset = 0;
 
       if (unlikely (rs < 1))
-        alloc_size = 1;
+        alloc_size = 0;
       else
-        alloc_size = rs * sizeof (GFC_REAL_10);
+        alloc_size = rs;
 
-      ret->base_addr = xmalloc (alloc_size);
+      ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
       ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
     }