aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/resolve.c19
2 files changed, 11 insertions, 15 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 3fc67d7..3613745 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,12 @@
2007-05-08 Paul Thomas <pault@gcc.gnu.org>
+ PR fortran/31630
+ * resolve.c (resolve_symbol): Remove the flagging mechanism from the
+ formal namespace resolution and instead check that the formal
+ namespace is not the current namespace.
+
+2007-05-08 Paul Thomas <pault@gcc.gnu.org>
+
PR fortran/31692
* trans-array.c (gfc_conv_array_parameter): Convert full array
references to the result of the procedure enclusing the call.
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 4ec9a92..5c5d40b 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6136,9 +6136,7 @@ resolve_fl_parameter (gfc_symbol *sym)
static void
resolve_symbol (gfc_symbol *sym)
{
- /* Zero if we are checking a formal namespace. */
- static int formal_ns_flag = 1;
- int formal_ns_save, check_constant, mp_flag;
+ int check_constant, mp_flag;
gfc_symtree *symtree;
gfc_symtree *this_symtree;
gfc_namespace *ns;
@@ -6345,18 +6343,9 @@ resolve_symbol (gfc_symbol *sym)
formal_arg_flag = 0;
- /* Resolve formal namespaces. The symbols in formal namespaces that
- themselves are from procedures in formal namespaces will not stand
- resolution, except when they are use associated.
- TODO: Fix the symbols in formal namespaces so that resolution can
- be done unconditionally. */
- if (formal_ns_flag && sym != NULL && sym->formal_ns != NULL)
- {
- formal_ns_save = formal_ns_flag;
- formal_ns_flag = sym->attr.use_assoc ? 1 : 0;
- gfc_resolve (sym->formal_ns);
- formal_ns_flag = formal_ns_save;
- }
+ /* Resolve formal namespaces. */
+ if (sym->formal_ns && sym->formal_ns != gfc_current_ns)
+ gfc_resolve (sym->formal_ns);
/* Check threadprivate restrictions. */
if (sym->attr.threadprivate && !sym->attr.save