aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-08-10 13:08:13 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-08-10 13:08:13 +0000
commit5a39e998c8a89b26a74b9fb0b5bc17fa8b55d274 (patch)
tree6fba9baba5669dab3d554c58cd986fa8e0711087 /gcc/toplev.c
parent5250a5bbb098b302d251aaa116bc15f50e15c4c8 (diff)
downloadgcc-5a39e998c8a89b26a74b9fb0b5bc17fa8b55d274.zip
gcc-5a39e998c8a89b26a74b9fb0b5bc17fa8b55d274.tar.gz
gcc-5a39e998c8a89b26a74b9fb0b5bc17fa8b55d274.tar.bz2
toplev.c: set FILE * globals to NULL after fclose
gcc/ChangeLog: * toplev.c (finalize): Set aux_info_file, asm_out_file, and stack_usage_file to NULL after fclose calls. From-SVN: r239322
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b0bb3ec..ddaee8a 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1894,6 +1894,7 @@ finalize (bool no_backend)
if (flag_gen_aux_info)
{
fclose (aux_info_file);
+ aux_info_file = NULL;
if (seen_error ())
unlink (aux_info_file_name);
}
@@ -1908,10 +1909,14 @@ finalize (bool no_backend)
fatal_error (input_location, "error writing to %s: %m", asm_file_name);
if (fclose (asm_out_file) != 0)
fatal_error (input_location, "error closing %s: %m", asm_file_name);
+ asm_out_file = NULL;
}
if (stack_usage_file)
- fclose (stack_usage_file);
+ {
+ fclose (stack_usage_file);
+ stack_usage_file = NULL;
+ }
if (!no_backend)
{