summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/save_3.f90
blob: ab2ee52685a31e6bda85e9c8437f9526c0f5cc45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { 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

! { dg-final { cleanup-modules "g95bug" } }