]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/libgfortran/lib/contrib/generated/parity_l16.c
Update
[l4.git] / l4 / pkg / libgfortran / lib / contrib / generated / parity_l16.c
index 58c0a3c8d02066e01ab086f3c2decdae6cf1540b..d3d62d22e519913ddea45104c6596225ebc7dff0 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-2015 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;
 
@@ -98,9 +98,9 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
       retarray->offset = 0;
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
 
-      alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
-                  * extent[rank-1];
+      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
       if (alloc_size == 0)
        {
          /* Make sure we have a zero-sized array.  */
@@ -108,8 +108,6 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
          return;
 
        }
-      else
-       retarray->data = internal_malloc_size (alloc_size);
     }
   else
     {
@@ -132,8 +130,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)