summaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-04 14:31:20 +0000
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-04 14:31:20 +0000
commit348ab1da4aff7da8234fa785fb0e1d366f8cb040 (patch)
treeaf4f300fee8dcad96c7a677c7cdd03fb3a43cc16 /gcc/dumpfile.c
parentdbb9127fc98cbc0cbad9830481879332dc4562d9 (diff)
downloadgcc-348ab1da4aff7da8234fa785fb0e1d366f8cb040.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 6f15634ab7b..6ac15ddf6f3 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