aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-03-18 10:50:23 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2013-03-18 10:50:23 +0100
commit9fa5223135cf837e920329b2aee6f87f9515d231 (patch)
tree25e8e8b691c5f6e57051576d9f133388c1a8479e /gcc/fortran/parse.c
parent0d5a1b56948ace8d94b7ab74c303cdc842413c3c (diff)
downloadgcc-9fa5223135cf837e920329b2aee6f87f9515d231.zip
gcc-9fa5223135cf837e920329b2aee6f87f9515d231.tar.gz
gcc-9fa5223135cf837e920329b2aee6f87f9515d231.tar.bz2
gfortran.h (gfc_option_t): Remove flag_whole_file.
2013-03-18 Tobias Burnus <burnus@net-b.de> * 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. From-SVN: r196773
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c41
1 files changed, 10 insertions, 31 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 6ee7b7f..a7fa7dc 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;