1! { dg-do compile } 2! { dg-options "-Wall" } 3module foo 4 integer, private :: i ! { dg-warning "Unused PRIVATE" } 5 integer, private :: j = 0 6contains 7 subroutine bar 8 j = j + 1 9 end subroutine bar 10end module foo 11 12module bar 13 private 14 integer :: i ! { dg-warning "Unused PRIVATE" } 15end module bar 16