2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* resolve.c (resolve_types): Restore gfc_current_ns on exit.
* symbol.c (gfc_save_all): Removed blank line.
2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* gfortran.dg/save_3.f90: New test.
From-SVN: r140046
2008-09-05 Daniel Kraft <d@domob.eu>
+ PR fortran/35837
+ * resolve.c (resolve_types): Restore gfc_current_ns on exit.
+ * symbol.c (gfc_save_all): Removed blank line.
+
+2008-09-05 Daniel Kraft <d@domob.eu>
+
PR fortran/36746
* primary.c (gfc_match_rvalue): Removed logic to handle implicit
typing to a derived-type if a component reference is found.
gfc_charlen *cl;
gfc_data *d;
gfc_equiv *eq;
-
- gfc_current_ns = ns;
+ gfc_namespace* old_ns = gfc_current_ns;
/* Check that all IMPLICIT types are ok. */
if (!ns->seen_implicit_none)
return;
}
+ gfc_current_ns = ns;
+
resolve_entries (ns);
resolve_common_vars (ns->blank_common.head, false);
warn_unused_fortran_label (ns->st_labels);
gfc_resolve_uops (ns->uop_root);
+
+ gfc_current_ns = old_ns;
}
void
gfc_save_all (gfc_namespace *ns)
{
-
gfc_traverse_ns (ns, save_symbol);
}
+2008-09-05 Daniel Kraft <d@domob.eu>
+
+ PR fortran/35837
+ * gfortran.dg/save_3.f90: New test.
+
2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/37342
--- /dev/null
+! { dg-do compile }
+
+! PR fortran/35837
+! We used do have a problem with resolving "save all" and nested namespaces.
+
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module g95bug
+save
+integer :: i=20
+contains
+pure function tell_i() result (answer)
+ integer :: answer
+ answer=i
+end function tell_i
+end module g95bug