summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/public_private_module_6.f90
blob: b9145af113e82f1cf34c77586ccda58953e0a990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
! { dg-options "-O1" }
! { dg-require-visibility "" }
!
! PR fortran/54221
!
! Check that the unused PRIVATE "aaaa" variable is optimized away
!

module m
  private
  integer, save :: aaaa
end module m

! The xfail below has appeared with the introduction of submodules. 'aaaa'
! now is TREE_PUBLIC but has DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN set.

! { dg-final { scan-assembler-not "aaaa" { xfail *-*-* } } }