From e5b1675528722f816f06359daf618ab9e35f915a Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 4 Oct 2010 09:19:55 +0000 Subject: f95-lang.c (current_translation_unit): New global variable. 2010-10-04 Richard Guenther * f95-lang.c (current_translation_unit): New global variable. (gfc_create_decls): Build a translation-unit decl. (pushdecl): In the global binding-level use the translation-unit decl as DECL_CONTEXT. * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P. (build_function_decl): Likewise. Delay setting the assembler name, leave setting of DECL_CONTEXT to pushdecl. (trans_function_start): Use DECL_FILE_SCOPE_P. (gfc_create_module_variable): Likewise. Remove questionable asserts. * trans.c (gfc_generate_module_code): Likewise. From-SVN: r164928 --- gcc/fortran/trans.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/fortran/trans.c') diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index a608fb1..117d345 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -1414,12 +1414,10 @@ gfc_generate_module_code (gfc_namespace * ns) continue; gfc_create_function_decl (n, false); - gcc_assert (DECL_CONTEXT (n->proc_name->backend_decl) == NULL_TREE); DECL_CONTEXT (n->proc_name->backend_decl) = ns->proc_name->backend_decl; gfc_module_add_decl (entry, n->proc_name->backend_decl); for (el = ns->entries; el; el = el->next) { - gcc_assert (DECL_CONTEXT (el->sym->backend_decl) == NULL_TREE); DECL_CONTEXT (el->sym->backend_decl) = ns->proc_name->backend_decl; gfc_module_add_decl (entry, el->sym->backend_decl); } -- cgit v1.1