diff options
author | Teresa Johnson <tejohnson@google.com> | 2013-09-04 14:31:20 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@gcc.gnu.org> | 2013-09-04 14:31:20 +0000 |
commit | 71191083b767f94d0bfeeaafd5201c8f67769459 (patch) | |
tree | af4f300fee8dcad96c7a677c7cdd03fb3a43cc16 /gcc/dumpfile.c | |
parent | 0c488213e44259856dc5603b33615efd13c29018 (diff) | |
download | gcc-71191083b767f94d0bfeeaafd5201c8f67769459.zip gcc-71191083b767f94d0bfeeaafd5201c8f67769459.tar.gz gcc-71191083b767f94d0bfeeaafd5201c8f67769459.tar.bz2 |
dumpfile.c (dump_finish): Don't close stderr/stdout.
2013-09-04 Teresa Johnson <tejohnson@google.com>
* dumpfile.c (dump_finish): Don't close stderr/stdout.
* testsuite/gcc.dg/unroll_1.c: Test dumping to stderr.
From-SVN: r202260
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r-- | gcc/dumpfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 6f15634..6ac15dd 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -450,7 +450,9 @@ dump_finish (int phase) if (phase < 0) return; dfi = get_dump_file_info (phase); - if (dfi->pstream) + if (dfi->pstream && (!dfi->pfilename + || (strcmp("stderr", dfi->pfilename) != 0 + && strcmp("stdout", dfi->pfilename) != 0))) fclose (dfi->pstream); if (dfi->alt_stream && strcmp("stderr", dfi->alt_filename) != 0 |