From 044bbd712679826e0a8119cf3d5006e51c2dbd05 Mon Sep 17 00:00:00 2001 From: burnus Date: Mon, 18 Mar 2013 09:50:23 +0000 Subject: 2013-03-18 Tobias Burnus * gfortran.h (gfc_option_t): Remove flag_whole_file. * invoke.texi (-fno-whole-file): Remove. * lang.opt (fwhole-file): Change to Ignore. * options.c (gfc_init_options, gfc_post_options, gfc_handle_option): Remove !flag_whole_file handling * parse.c (resolve_all_program_units, * translate_all_program_units, gfc_parse_file): Ditto. * resolve.c (resolve_global_procedure): Ditto. * trans-decl.c (gfc_get_symbol_decl, * gfc_get_extern_function_decl, gfc_create_module_variable): Ditto. * trans-types.c (gfc_get_derived_type): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196773 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/parse.c | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) (limited to 'gcc/fortran/parse.c') diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 6ee7b7fb85c..a7fa7dc597e 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -4382,8 +4382,7 @@ add_global_program (void) } -/* Resolve all the program units when whole file scope option - is active. */ +/* Resolve all the program units. */ static void resolve_all_program_units (gfc_namespace *gfc_global_ns_list) { @@ -4424,9 +4423,8 @@ clean_up_modules (gfc_gsymbol *gsym) } -/* Translate all the program units when whole file scope option - is active. This could be in a different order to resolution if - there are forward references in the file. */ +/* Translate all the program units. This could be in a different order + to resolution if there are forward references in the file. */ static void translate_all_program_units (gfc_namespace *gfc_global_ns_list, bool main_in_tu) @@ -4551,8 +4549,7 @@ loop: accept_statement (st); add_global_program (); parse_progunit (ST_NONE); - if (gfc_option.flag_whole_file) - goto prog_units; + goto prog_units; break; case ST_SUBROUTINE: @@ -4560,8 +4557,7 @@ loop: push_state (&s, COMP_SUBROUTINE, gfc_new_block); accept_statement (st); parse_progunit (ST_NONE); - if (gfc_option.flag_whole_file) - goto prog_units; + goto prog_units; break; case ST_FUNCTION: @@ -4569,8 +4565,7 @@ loop: push_state (&s, COMP_FUNCTION, gfc_new_block); accept_statement (st); parse_progunit (ST_NONE); - if (gfc_option.flag_whole_file) - goto prog_units; + goto prog_units; break; case ST_BLOCK_DATA: @@ -4597,8 +4592,7 @@ loop: push_state (&s, COMP_PROGRAM, gfc_new_block); main_program_symbol (gfc_current_ns, "MAIN__"); parse_progunit (st); - if (gfc_option.flag_whole_file) - goto prog_units; + goto prog_units; break; } @@ -4615,19 +4609,9 @@ loop: if (s.state == COMP_MODULE) { gfc_dump_module (s.sym->name, errors_before == errors); - if (!gfc_option.flag_whole_file) - { - if (errors == 0) - gfc_generate_module_code (gfc_current_ns); - pop_state (); - gfc_done_2 (); - } - else - { - gfc_current_ns->derived_types = gfc_derived_types; - gfc_derived_types = NULL; - goto prog_units; - } + gfc_current_ns->derived_types = gfc_derived_types; + gfc_derived_types = NULL; + goto prog_units; } else { @@ -4660,9 +4644,6 @@ prog_units: done: - if (!gfc_option.flag_whole_file) - goto termination; - /* Do the resolution. */ resolve_all_program_units (gfc_global_ns_list); @@ -4681,8 +4662,6 @@ prog_units: /* Do the translation. */ translate_all_program_units (gfc_global_ns_list, seen_program); -termination: - gfc_end_source_files (); return SUCCESS; -- cgit v1.2.1