This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Add a global symbol table
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Jun 2004 01:15:15 +0100
- Subject: Re: [gfortran] Add a global symbol table
- Organization: CodeSourcery
- References: <40DC79D0.30402@physik.uni-muenchen.de>
> This is achieved by keeping a table of global symbols. A possible future
> application for this might be checking if external subroutines are
> called with consistent argument list. Additionally, the disallowed case
> of two empty BLOCK DATA is caught.
We already have a global namespace for intrinsic subroutines. See
gfc_intrinsic_namespace in intrinsic.c.
Could/Should this be be merged with your proposal?
> 2004-06-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
> Andrew Vaught <andyv@firstinter.net>
>
> * gfortran.h (gfc_gsymbol): New typedef.
> (gfc_gsym_root): New variable.
> (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
> * parse.c (global_used): New function.
> (parse_block_data): Check for double empty BLOCK DATA,
> use global symbol table.
> (parse_module): Use global symbol table.
> (add_global_procedure, add_global_program): New functions.
> (gfc_parse_file): Use global symbol table.
> * symbol.c (gfc_gsym_root): New variable.
> (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
> functions.
Ok, after you've considered the comments above and decided you still want to
do it this way.
Paul