Commit 18736654 by Richard Kenner

(compile_file): Initialize input_file_stack before calling lang_init,

not after.

From-SVN: r8975
parent 4e1bf5f5
...@@ -2204,6 +2204,12 @@ compile_file (name) ...@@ -2204,6 +2204,12 @@ compile_file (name)
input_filename = 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. /* Perform language-specific initialization.
This may set main_input_filename. */ This may set main_input_filename. */
lang_init (); lang_init ();
...@@ -2213,12 +2219,6 @@ compile_file (name) ...@@ -2213,12 +2219,6 @@ compile_file (name)
if (main_input_filename == 0) if (main_input_filename == 0)
main_input_filename = name; 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) if (!output_bytecode)
{ {
ASM_FILE_START (asm_out_file); ASM_FILE_START (asm_out_file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment