daily update
[deliverable/binutils-gdb.git] / gas / as.c
index 16711b1f819682449ace023a3e2c6a6c4ea9bbdd..727a1dd40ee58e5ac1c11a4e24185bfa324a286f 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -930,6 +930,14 @@ dump_statistics (void)
 #endif
 }
 
+#ifndef OBJ_VMS
+static void
+close_output_file (void)
+{
+  output_file_close (out_file_name);
+}
+#endif
+
 /* The interface between the macro code and gas expression handling.  */
 
 static int
@@ -1081,6 +1089,11 @@ main (int argc, char ** argv)
   input_scrub_begin ();
   expr_begin ();
 
+#ifndef OBJ_VMS /* Does its own file handling.  */
+  /* It has to be called after dump_statistics ().  */
+  xatexit (close_output_file);
+#endif
+
   if (flag_print_statistics)
     xatexit (dump_statistics);
 
@@ -1169,10 +1182,6 @@ main (int argc, char ** argv)
   listing_print (listing_filename);
 #endif
 
-#ifndef OBJ_VMS /* Does its own file handling.  */
-  output_file_close (out_file_name);
-#endif
-
   if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0)
     as_bad (_("%d warnings, treating warnings as errors"), had_warnings ());
 
This page took 0.023788 seconds and 4 git commands to generate.