Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libgfortran / generated / parity_l16.c
index 58c0a3c..c202cad 100644 (file)
@@ -1,5 +1,5 @@
-/* Implementation of the NORM2 intrinsic
-   Copyright 2010 Free Software Foundation, Inc.
+/* Implementation of the PARITY intrinsic
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
    Contributed by Tobias Burnus  <burnus@net-b.de>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -80,7 +80,7 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
        extent[n] = 0;
     }
 
-  if (retarray->data == NULL)
+  if (retarray->base_addr == NULL)
     {
       size_t alloc_size, str;
 
@@ -101,6 +101,7 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
       alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
                   * extent[rank-1];
 
+      retarray->base_addr = xmalloc (alloc_size);
       if (alloc_size == 0)
        {
          /* Make sure we have a zero-sized array.  */
@@ -108,8 +109,6 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
          return;
 
        }
-      else
-       retarray->data = internal_malloc_size (alloc_size);
     }
   else
     {
@@ -132,8 +131,8 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
        return;
     }
 
-  base = array->data;
-  dest = retarray->data;
+  base = array->base_addr;
+  dest = retarray->base_addr;
 
   continue_loop = 1;
   while (continue_loop)