f95-lang.c (current_translation_unit): New global variable.
authorRichard Guenther <rguenther@suse.de>
Mon, 4 Oct 2010 09:19:55 +0000 (09:19 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 4 Oct 2010 09:19:55 +0000 (09:19 +0000)
commite5b1675528722f816f06359daf618ab9e35f915a
tree3df5663a777d19ca33ed5257ae33e1e30b4836fd
parentb453ace381f3c9b664916076ccd0bd1dbc9d5cc3
f95-lang.c (current_translation_unit): New global variable.

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.

From-SVN: r164928
gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c
gcc/fortran/trans-decl.c
gcc/fortran/trans.c