2010-10-04 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Oct 2010 09:19:55 +0000 (09:19 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Oct 2010 09:19:55 +0000 (09:19 +0000)
commit16a4051358c6edc544925ae6badbc5d2da91a7d7
tree3df5663a777d19ca33ed5257ae33e1e30b4836fd
parentdae1a11c29c256aaef295161a1b99caf39a020ed
2010-10-04  Richard Guenther  <rguenther@suse.de>

* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164928 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c
gcc/fortran/trans-decl.c
gcc/fortran/trans.c