aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/access_spec_3.f90
blob: 838b47b2f4b80ec4083edb19e164404a08a98b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
! { dg-do compile }
!
! Tests the fix for PR36454, where the PUBLIC declaration for
! aint and bint was rejected because the access was already set.
!
! Contributed by Thomas Orgis <thomas.orgis@awi.de>

module base
        integer :: baseint
end module

module a
        use base, ONLY: aint => baseint
end module

module b
        use base, ONLY: bint => baseint
end module

module c
        use a
        use b
        private
        public :: aint, bint
end module

program user
        use c, ONLY: aint, bint

        aint = 3
        bint = 8
        write(*,*) aint
end program