mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 06:54:29 +08:00
re PR fortran/35837 (rej.valid: Host-associated SAVEd variable and PURE function)
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
This commit is contained in:
parent
5ffebee7bb
commit
a82f1f2efa
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -10116,8 +10116,7 @@ resolve_types (gfc_namespace *ns)
|
||||
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)
|
||||
@ -10131,6 +10130,8 @@ resolve_types (gfc_namespace *ns)
|
||||
return;
|
||||
}
|
||||
|
||||
gfc_current_ns = ns;
|
||||
|
||||
resolve_entries (ns);
|
||||
|
||||
resolve_common_vars (ns->blank_common.head, false);
|
||||
@ -10185,6 +10186,8 @@ resolve_types (gfc_namespace *ns)
|
||||
warn_unused_fortran_label (ns->st_labels);
|
||||
|
||||
gfc_resolve_uops (ns->uop_root);
|
||||
|
||||
gfc_current_ns = old_ns;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3194,7 +3194,6 @@ save_symbol (gfc_symbol *sym)
|
||||
void
|
||||
gfc_save_all (gfc_namespace *ns)
|
||||
{
|
||||
|
||||
gfc_traverse_ns (ns, save_symbol);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
16
gcc/testsuite/gfortran.dg/save_3.f90
Normal file
16
gcc/testsuite/gfortran.dg/save_3.f90
Normal file
@ -0,0 +1,16 @@
|
||||
! { 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
|
Loading…
Reference in New Issue
Block a user