diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-08-29 18:58:39 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-08-29 18:58:39 +0200 |
commit | 294fbfc89faac46092334188d2bbe527880794a7 (patch) | |
tree | 7bdfd86accd5c303039855aeeec2bd0434510805 /gcc/fortran/symbol.c | |
parent | 048c989961b261b522d1af001cec42518361e36b (diff) | |
download | gcc-294fbfc89faac46092334188d2bbe527880794a7.zip gcc-294fbfc89faac46092334188d2bbe527880794a7.tar.gz gcc-294fbfc89faac46092334188d2bbe527880794a7.tar.bz2 |
re PR fortran/13910 (Cannot initialize variables with declation as allowed by g77)
fortran/
PR fortran/13910
* decl.c (free_variable, free_value, gfc_free_data, var_list,
var_element, top_var_list, match_data_constant, top_val_list,
gfc_match_data): Move here from match.c.
(match_old_style_init): New function.
(variable_decl): Match old-style initialization.
* expr.c (gfc_get_variable_expr): New function.
* gfortran.h (gfc_get_variable_expr): Add prototype.
* gfortran.texi: Start documentation for supported extensions.
* match.c: Remove the functions moved to decl.c.
* match.h (gfc_match_data): Move prototype to under decl.c.
* symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
comments.
testsuite/
PR fortran/13910
* gfortran.dg/oldstyle_1.f90: New test.
From-SVN: r86729
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index b709721..25419cc 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1763,13 +1763,13 @@ ambiguous_symbol (const char *name, gfc_symtree * st) } -/* Search for a symbol starting in the current namespace, resorting to +/* Search for a symtree starting in the current namespace, resorting to any parent namespaces if requested by a nonzero parent_flag. - Returns nonzero if the symbol is ambiguous. */ + Returns nonzero if the name is ambiguous. */ int gfc_find_sym_tree (const char *name, gfc_namespace * ns, int parent_flag, - gfc_symtree ** result) + gfc_symtree ** result) { gfc_symtree *st; @@ -1803,6 +1803,8 @@ gfc_find_sym_tree (const char *name, gfc_namespace * ns, int parent_flag, } +/* Same, but returns the symbol instead. */ + int gfc_find_symbol (const char *name, gfc_namespace * ns, int parent_flag, gfc_symbol ** result) |