summaryrefslogtreecommitdiff
path: root/libgfortran/generated/norm2_r8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/norm2_r8.c')
-rw-r--r--libgfortran/generated/norm2_r8.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libgfortran/generated/norm2_r8.c b/libgfortran/generated/norm2_r8.c
index 4a477762b3b..9dcd8cfa6f9 100644
--- a/libgfortran/generated/norm2_r8.c
+++ b/libgfortran/generated/norm2_r8.c
@@ -83,7 +83,7 @@ norm2_r8 (gfc_array_r8 * const restrict retarray,
extent[n] = 0;
}
- if (retarray->data == NULL)
+ if (retarray->base_addr == NULL)
{
size_t alloc_size, str;
@@ -104,6 +104,7 @@ norm2_r8 (gfc_array_r8 * const restrict retarray,
alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
* extent[rank-1];
+ retarray->base_addr = internal_malloc_size (alloc_size);
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -111,8 +112,6 @@ norm2_r8 (gfc_array_r8 * const restrict retarray,
return;
}
- else
- retarray->data = internal_malloc_size (alloc_size);
}
else
{
@@ -135,8 +134,8 @@ norm2_r8 (gfc_array_r8 * const restrict retarray,
return;
}
- base = array->data;
- dest = retarray->data;
+ base = array->base_addr;
+ dest = retarray->base_addr;
continue_loop = 1;
while (continue_loop)