aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2009-03-06 09:06:51 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2009-03-06 09:06:51 +0000
commit47ed69db7ee9361910c539b35256315ee04e1186 (patch)
tree2dadbada4580ef9771695b019833c4b51692a5e8 /gcc/fortran/simplify.c
parent8ae5dff133bbc8e47b9a261f609055aff59c1155 (diff)
downloadgcc-47ed69db7ee9361910c539b35256315ee04e1186.zip
gcc-47ed69db7ee9361910c539b35256315ee04e1186.tar.gz
gcc-47ed69db7ee9361910c539b35256315ee04e1186.tar.bz2
simplify.c (gfc_simplify_transfer): Zero-initialize the buffer.
* simplify.c (gfc_simplify_transfer): Zero-initialize the buffer. From-SVN: r144663
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 6893a88..7be4671 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -4541,6 +4541,7 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size)
/* Allocate the buffer to store the binary version of the source. */
buffer_size = MAX (source_size, result_size);
buffer = (unsigned char*)alloca (buffer_size);
+ memset (buffer, 0, buffer_size);
/* Now write source to the buffer. */
gfc_target_encode_expr (source, buffer, buffer_size);