Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libgfortran / generated / unpack_c8.c
index 7298eec..4c604e1 100644 (file)
@@ -1,9 +1,9 @@
 /* Specific implementation of the UNPACK intrinsic
-   Copyright 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008-2013 Free Software Foundation, Inc.
    Contributed by Thomas Koenig <tkoenig@gcc.gnu.org>, based on
    unpack_generic.c by Paul Brook <paul@nowt.org>.
 
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
+This file is part of the GNU Fortran runtime library (libgfortran).
 
 Libgfortran is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public
@@ -61,7 +61,7 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
 
   empty = 0;
 
-  mptr = mask->data;
+  mptr = mask->base_addr;
 
   /* Use the same loop for all logical types, by using GFC_LOGICAL_1
      and using shifting to address size and endian issues.  */
@@ -81,7 +81,7 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
   else
     runtime_error ("Funny sized logical array");
 
-  if (ret->data == NULL)
+  if (ret->base_addr == NULL)
     {
       /* The front end has signalled that we need to populate the
         return array descriptor.  */
@@ -99,7 +99,7 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
          rs *= extent[n];
        }
       ret->offset = 0;
-      ret->data = internal_malloc_size (rs * sizeof (GFC_COMPLEX_8));
+      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
     }
   else
     {
@@ -127,8 +127,8 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
     vstride0 = 1;
   rstride0 = rstride[0];
   mstride0 = mstride[0];
-  rptr = ret->data;
-  vptr = vector->data;
+  rptr = ret->base_addr;
+  vptr = vector->base_addr;
 
   while (rptr)
     {
@@ -205,7 +205,7 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
 
   empty = 0;
 
-  mptr = mask->data;
+  mptr = mask->base_addr;
 
   /* Use the same loop for all logical types, by using GFC_LOGICAL_1
      and using shifting to address size and endian issues.  */
@@ -225,7 +225,7 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
   else
     runtime_error ("Funny sized logical array");
 
-  if (ret->data == NULL)
+  if (ret->base_addr == NULL)
     {
       /* The front end has signalled that we need to populate the
         return array descriptor.  */
@@ -244,7 +244,7 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
          rs *= extent[n];
        }
       ret->offset = 0;
-      ret->data = internal_malloc_size (rs * sizeof (GFC_COMPLEX_8));
+      ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
     }
   else
     {
@@ -276,9 +276,9 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector,
   rstride0 = rstride[0];
   fstride0 = fstride[0];
   mstride0 = mstride[0];
-  rptr = ret->data;
-  fptr = field->data;
-  vptr = vector->data;
+  rptr = ret->base_addr;
+  fptr = field->base_addr;
+  vptr = vector->base_addr;
 
   while (rptr)
     {