aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-02-21 05:36:34 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-02-21 05:36:34 -0500
commit187366548bbfd52a2f3ba6999d439a6388fa535d (patch)
tree4d203c9654bf2113d22fc1938225f002878ec852 /gcc
parent4e1bf5f536807466596c2195f7180351e7de89ca (diff)
downloadgcc-187366548bbfd52a2f3ba6999d439a6388fa535d.zip
gcc-187366548bbfd52a2f3ba6999d439a6388fa535d.tar.gz
gcc-187366548bbfd52a2f3ba6999d439a6388fa535d.tar.bz2
(compile_file): Initialize input_file_stack before calling lang_init,
not after. From-SVN: r8975
Diffstat (limited to 'gcc')
-rw-r--r--gcc/toplev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 8d4a8c4..04405c3 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2204,6 +2204,12 @@ compile_file (name)
input_filename = name;
+ /* Put an entry on the input file stack for the main input file. */
+ input_file_stack
+ = (struct file_stack *) xmalloc (sizeof (struct file_stack));
+ input_file_stack->next = 0;
+ input_file_stack->name = input_filename;
+
/* Perform language-specific initialization.
This may set main_input_filename. */
lang_init ();
@@ -2213,12 +2219,6 @@ compile_file (name)
if (main_input_filename == 0)
main_input_filename = name;
- /* Put an entry on the input file stack for the main input file. */
- input_file_stack
- = (struct file_stack *) xmalloc (sizeof (struct file_stack));
- input_file_stack->next = 0;
- input_file_stack->name = input_filename;
-
if (!output_bytecode)
{
ASM_FILE_START (asm_out_file);