summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/public_private_module.f90
blob: 48e78b60cfa7ffa304a5e63c186196d0c62fb6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! See PR fortran/36251.
module a
  implicit none
  integer :: i = 42
end module a

module b
  use a
  implicit none
  public a  ! { dg-error "attribute applied to" }
end module b

module d
  use a
  implicit none
  private a  ! { dg-error "attribute applied to" }
end module d
! { dg-final { cleanup-modules "a" } }