From 2888c8d4923caae0323c68fa905fbe269c568c47 Mon Sep 17 00:00:00 2001 From: Bernhard Fischer Date: Sun, 11 Feb 2007 00:25:55 +0100 Subject: [PATCH] backport: re PR fortran/24783 ([4.1 and 4.2 only] Implicit none in module overwrite explicit in procedure) 2007-02-10 Bernhard Fischer Backport from trunk PR fortran/24783 * resolve.c (resolve_variable): Get the implicit type from the symbols namespace rather than the default namespace. Fix whitespace. (resolve_formal_arglist, resolve_equivalence): Fix typo. From-SVN: r121804 --- gcc/fortran/ChangeLog | 8 ++++++++ gcc/fortran/resolve.c | 8 +++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8b7a4d597736..eeaeee4698c0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2007-02-10 Bernhard Fischer + + Backport from trunk + PR fortran/24783 + * resolve.c (resolve_variable): Get the implicit type from the + symbols namespace rather than the default namespace. Fix whitespace. + (resolve_formal_arglist, resolve_equivalence): Fix typo. + 2007-02-05 Steven G. Kargl PR fortran/30605 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 8b7e9fb13f7a..f91b8c7c86e6 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -239,7 +239,7 @@ resolve_formal_arglist (gfc_symbol * proc) { gfc_error ("Character-valued argument '%s' of statement function at " - "%L must has constant length", + "%L must have constant length", sym->name, &sym->declared_at); continue; } @@ -3121,7 +3121,7 @@ resolve_variable (gfc_expr * e) else { /* Must be a simple variable reference. */ - if (gfc_set_default_type (sym, 1, NULL) == FAILURE) + if (gfc_set_default_type (sym, 1, sym->ns) == FAILURE) return FAILURE; e->ts = sym->ts; } @@ -6198,11 +6198,9 @@ resolve_symbol (gfc_symbol * sym) case FL_PARAMETER: if (resolve_fl_parameter (sym) == FAILURE) return; - break; default: - break; } @@ -6924,7 +6922,7 @@ resolve_equivalence (gfc_equiv *eq) { if (value_name != NULL) { - gfc_error ("Initialized objects '%s' and '%s' cannot both " + gfc_error ("Initialized objects '%s' and '%s' cannot both " "be in the EQUIVALENCE statement at %L", value_name, sym->name, &e->where); continue;