summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/target-memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/target-memory.c')
-rw-r--r--gcc/fortran/target-memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index 03a5b58c8a3..b5c90a7b5d4 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -569,7 +569,7 @@ gfc_target_interpret_expr (unsigned char *buffer, size_t buffer_size,
else
{
result->representation.string =
- (char *) gfc_getmem (result->representation.length + 1);
+ XCNEWVEC (char, result->representation.length + 1);
memcpy (result->representation.string, buffer,
result->representation.length);
result->representation.string[result->representation.length] = '\0';
OpenPOWER on IntegriCloud