aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2001-05-07 15:51:21 +0000
committerJeff Law <law@gcc.gnu.org>2001-05-07 09:51:21 -0600
commit1a02aff4998ca1573c9431b81fcd44c2966b23f5 (patch)
tree34a97b443143487790dc8492fde9627c5608b41c /gcc
parentcb0bb87d89f7f00656c8ffe9907490bf9de34631 (diff)
downloadgcc-1a02aff4998ca1573c9431b81fcd44c2966b23f5.zip
gcc-1a02aff4998ca1573c9431b81fcd44c2966b23f5.tar.gz
gcc-1a02aff4998ca1573c9431b81fcd44c2966b23f5.tar.bz2
toplev.c (compile_file): Set up the output file before we call the various initializers for the compiler.
* toplev.c (compile_file): Set up the output file before we call the various initializers for the compiler. From-SVN: r41897
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/toplev.c42
2 files changed, 24 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd27cd5..5d36475 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Mon May 7 09:30:14 2001 Jeffrey A Law (law@cygnus.com)
+ * toplev.c (compile_file): Set up the output file before we call
+ the various initializers for the compiler.
+
* except.c (sjlj_mark_call_sites): Do not search for assignments to
non-argumment registers that are mentioned in CALL_INSN_FUNCTION_USAGE.
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 9c0fcf4..31e6387 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2149,6 +2149,27 @@ compile_file (name)
init_timevar ();
timevar_start (TV_TOTAL);
+ if (! name_specified && asm_file_name == 0)
+ asm_out_file = stdout;
+ else
+ {
+ if (asm_file_name == 0)
+ {
+ int len = strlen (dump_base_name);
+ char *dumpname = (char *) xmalloc (len + 6);
+ memcpy (dumpname, dump_base_name, len + 1);
+ strip_off_ending (dumpname, len);
+ strcat (dumpname, ".s");
+ asm_file_name = dumpname;
+ }
+ if (!strcmp (asm_file_name, "-"))
+ asm_out_file = stdout;
+ else
+ asm_out_file = fopen (asm_file_name, "w");
+ if (asm_out_file == 0)
+ fatal_io_error ("can't open %s for writing", asm_file_name);
+ }
+
/* Initialize data in various passes. */
init_obstacks ();
@@ -2193,27 +2214,6 @@ compile_file (name)
because then the driver will have provided the name of a temporary
file or bit bucket for us. */
- if (! name_specified && asm_file_name == 0)
- asm_out_file = stdout;
- else
- {
- if (asm_file_name == 0)
- {
- int len = strlen (dump_base_name);
- char *dumpname = (char *) xmalloc (len + 6);
- memcpy (dumpname, dump_base_name, len + 1);
- strip_off_ending (dumpname, len);
- strcat (dumpname, ".s");
- asm_file_name = dumpname;
- }
- if (!strcmp (asm_file_name, "-"))
- asm_out_file = stdout;
- else
- asm_out_file = fopen (asm_file_name, "w");
- if (asm_out_file == 0)
- fatal_io_error ("can't open %s for writing", asm_file_name);
- }
-
#ifdef IO_BUFFER_SIZE
setvbuf (asm_out_file, (char *) xmalloc (IO_BUFFER_SIZE),
_IOFBF, IO_BUFFER_SIZE);