From a35c9beff6490bacf35d5aa12ad345e056206290 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 25 Jul 2012 16:40:26 +0000 Subject: [PATCH] list_read.c (list_formatted_read_scalar): Fix copying real value back to temporary. * io/list_read.c (list_formatted_read_scalar): Fix copying real value back to temporary. From-SVN: r189856 --- libgfortran/ChangeLog | 5 +++++ libgfortran/io/list_read.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 96a8e8ba42a..9f0ed3ec77f 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2012-07-25 Andreas Schwab + + * io/list_read.c (list_formatted_read_scalar): Fix copying real + value back to temporary. + 2012-06-21 Janne Blomqvist PR fortran/39654 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 6155d974e8b..9d301d62418 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -1888,7 +1888,7 @@ list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p, read_real (dtp, p, kind); /* Copy value back to temporary if needed. */ if (dtp->u.p.repeat_count > 0) - memcpy (dtp->u.p.value, p, kind); + memcpy (dtp->u.p.value, p, size); break; case BT_COMPLEX: read_complex (dtp, p, kind, size);