diff options
author | Erik Edelmann <eedelman@gcc.gnu.org> | 2005-11-01 21:40:06 +0000 |
---|---|---|
committer | Erik Edelmann <eedelman@gcc.gnu.org> | 2005-11-01 21:40:06 +0000 |
commit | 6a8697062cd7b29a9bb17b5d4af09035e143a23d (patch) | |
tree | 0ee1433fb0643d7286402f0cb08dcb92b6e4f0f9 /gcc/fortran/trans.c | |
parent | 92119f26f7b3b4cb611ef71d5d786c9960434440 (diff) | |
download | gcc-6a8697062cd7b29a9bb17b5d4af09035e143a23d.zip gcc-6a8697062cd7b29a9bb17b5d4af09035e143a23d.tar.gz gcc-6a8697062cd7b29a9bb17b5d4af09035e143a23d.tar.bz2 |
re PR fortran/24245 (-fdump-parse-tree gives ICE for CONTAINED functions)
fortran/
2005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
PR 24245
* trans.c (gfc_generate_code): Move code to create a main
program symbol from here ...
* parse.c (main_program_symbol): ... to this new
function, setting the locus from gfc_current_locus
instead of ns->code->loc.
(gfc_parse_file): Call main_program_symbol for main programs.
From-SVN: r106353
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r-- | gcc/fortran/trans.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index a3c3ddc..5f7c860 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -656,30 +656,6 @@ gfc_generate_code (gfc_namespace * ns) return; } - /* Main program subroutine. */ - if (!ns->proc_name) - { - gfc_symbol *main_program; - symbol_attribute attr; - - /* Lots of things get upset if a subroutine doesn't have a symbol, so we - make one now. Hopefully we've set all the required fields. */ - gfc_get_symbol ("MAIN__", ns, &main_program); - gfc_clear_attr (&attr); - attr.flavor = FL_PROCEDURE; - attr.proc = PROC_UNKNOWN; - attr.subroutine = 1; - attr.access = ACCESS_PUBLIC; - attr.is_main_program = 1; - main_program->attr = attr; - - /* Set the location to the first line of code. */ - if (ns->code) - main_program->declared_at = ns->code->loc; - ns->proc_name = main_program; - gfc_commit_symbols (); - } - gfc_generate_function_code (ns); } |