Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libgfortran / intrinsics / eoshift0.c
index 6ceed20..118ea68 100644 (file)
@@ -1,8 +1,8 @@
 /* Generic implementation of the EOSHIFT intrinsic
-   Copyright 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2002-2013 Free Software Foundation, Inc.
    Contributed 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
@@ -64,7 +64,7 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
 
   arraysize = size0 ((array_t *) array);
 
-  if (ret->data == NULL)
+  if (ret->base_addr == NULL)
     {
       int i;
 
@@ -86,8 +86,8 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
 
         }
 
-      /* internal_malloc_size allocates a single byte for zero size.  */
-      ret->data = internal_malloc_size (size * arraysize);
+      /* xmalloc allocates a single byte for zero size.  */
+      ret->base_addr = xmalloc (size * arraysize);
     }
   else if (unlikely (compile_options.bounds_check))
     {
@@ -134,8 +134,8 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
   dim = GFC_DESCRIPTOR_RANK (array);
   rstride0 = rstride[0];
   sstride0 = sstride[0];
-  rptr = ret->data;
-  sptr = array->data;
+  rptr = ret->base_addr;
+  sptr = array->base_addr;
 
   if ((shift >= 0 ? shift : -shift) > len)
     {