OSDN Git Service

2011-09-10 Thomas Koenig <tkoenig@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libgfortran / generated / maxloc1_4_i16.c
index 1b4f337..71850fc 100644 (file)
@@ -101,6 +101,7 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
       alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
                   * extent[rank-1];
 
+      retarray->data = internal_malloc_size (alloc_size);
       if (alloc_size == 0)
        {
          /* Make sure we have a zero-sized array.  */
@@ -108,8 +109,6 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
          return;
 
        }
-      else
-       retarray->data = internal_malloc_size (alloc_size);
     }
   else
     {