summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warn_unused_var_2.f90
blob: 7eccc6e6c1f531343ae4a0d9437839553c5a655e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-options "-Wunused" }
!
! PR fortran/31461
!
! Contributed by Vivek Rao.
!

module util_mod
  integer :: i,j
end module util_mod

program main
  use util_mod, only: i,j ! { dg-warning "Unused module variable .i. which has been explicitly imported" }
  j = 1
  print*,"j=",j
end program main

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