diff options
author | Thomas Koenig <Thomas.Koenig@online.de> | 2005-05-12 17:50:33 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2005-05-12 17:50:33 +0000 |
commit | c42a19d5e3a8236af3b727cd708bac22a8608b9d (patch) | |
tree | 35e0ae8368fc459238e0ba93fbf129aef6b0c137 /libgfortran/io/open.c | |
parent | 7cc70b5e3c155ae457f89871dd7f644079f08a61 (diff) | |
download | gcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.zip gcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.tar.gz gcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.tar.bz2 |
re PR libfortran/21324 (#undef GFC_CLEAR_MEMORY causes testsuite failures)
2005-05-12 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21324
* runtime/memory.c: Don't define GFC_CLEAR_MEMORY (it's a
performance hog).
* io/open.c (new_unit): Zero freshly allocated memory for
unit structure.
* io/unit.c (init_units): Zero freshly allocated memory for
STDIN, STDOUT and STDERR.
* io/unix.c (open_internal): Zero freshly allocated memory
for unix_stream.
(fd_to_stream): Likewise.
From-SVN: r99619
Diffstat (limited to 'libgfortran/io/open.c')
-rw-r--r-- | libgfortran/io/open.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 97bf6e4..f579f1f 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -351,6 +351,7 @@ new_unit (unit_flags * flags) /* Create the unit structure. */ u = get_mem (sizeof (gfc_unit) + ioparm.file_len); + memset (u, '\0', sizeof (gfc_unit) + ioparm.file_len); u->unit_number = ioparm.unit; u->s = s; |