http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58177
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #1 from janus at gcc dot gnu.org --- (In reply to Andrew Benson from comment #0) > module a > logical :: m > end module a > module b > logical, private :: m > contains > subroutine bb() > use a > m=.true. > end subroutine bb > end module b > > [...] > > logical, private :: m > > 1 > Warning: Unused PRIVATE module variable 'm' declared at (1) AFAICS the warning is correct: Your USE statement imports all public symbols from module a, including 'm'. Therefore the 'm' from 'a' is used and not the 'm' from 'b'. The same is achieved by explicitly importing 'm' via use a, only: m which gives the same warning (correctly, I would say). Or am I missing something here?