diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2005-02-23 20:02:29 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-02-23 20:02:29 +0100 |
commit | 0366dfe99326220dbcb8e046d7e1e77e9c4ac12d (patch) | |
tree | c3dd910bd906ccffa8fb44a3d9043fe315e80a35 /gcc/fortran/symbol.c | |
parent | 6b2117468998909065f7075541593af7ee9d8268 (diff) | |
download | gcc-0366dfe99326220dbcb8e046d7e1e77e9c4ac12d.zip gcc-0366dfe99326220dbcb8e046d7e1e77e9c4ac12d.tar.gz gcc-0366dfe99326220dbcb8e046d7e1e77e9c4ac12d.tar.bz2 |
gfortran.h (gfc_get_namespace): Add second argument to prototype.
fortran/
* gfortran.h (gfc_get_namespace): Add second argument to prototype.
* intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
gfc_get_namespace.
* module.c (mio_namespace_ref, load_needed): Likewise.
* parse.c (parse_interface, parse_contained): Likewise. Here the
correct second argument matters.
* symbol.c (gfc_get_namespace): Add parent_types argument, only copy
parent's implicit types if this is set.
(gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
* trans-common.c (build_common_decl): Likewise.
testsuite/
* gfortran.dg/implicit_3.f90: New test.
From-SVN: r95463
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 702a387..efe1211 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1531,10 +1531,11 @@ done: this case, that symbol has been used as a host associated variable at some previous time. */ -/* Allocate a new namespace structure. */ +/* Allocate a new namespace structure. Copies the implicit types from + PARENT if PARENT_TYPES is set. */ gfc_namespace * -gfc_get_namespace (gfc_namespace * parent) +gfc_get_namespace (gfc_namespace * parent, int parent_types) { gfc_namespace *ns; gfc_typespec *ts; @@ -1556,7 +1557,7 @@ gfc_get_namespace (gfc_namespace * parent) ns->set_flag[i - 'a'] = 0; ts = &ns->default_type[i - 'a']; - if (ns->parent != NULL) + if (parent_types && ns->parent != NULL) { /* Copy parent settings */ *ts = ns->parent->default_type[i - 'a']; @@ -2243,7 +2244,7 @@ void gfc_symbol_init_2 (void) { - gfc_current_ns = gfc_get_namespace (NULL); + gfc_current_ns = gfc_get_namespace (NULL, 0); } |