public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* bogus unused module variable warning
@ 2018-02-05 12:21 Anton Shterenlikht
  0 siblings, 0 replies; only message in thread
From: Anton Shterenlikht @ 2018-02-05 12:21 UTC (permalink / raw)
  To: fortran

Hi

I have a module with submodules.
A submodule uses module variables by host association.
These variables are not used in the module file.
Hence I get warnings like this:

   mpi_h3_rv        ! MPI halo, dim 3, right virtual
           1
Warning: Unused PRIVATE module variable 'mpi_h3_rv' declared at (1) [-Wunused-value]

I guess this is because when the module file is
compiled, there is no way to know whether any
of the unused variables are used in submodules.

Even I compile both the module and the submodule file
at the same, i.e. in the same gfortran command invocation,
I get this unused warning.

I like to compile with -Wall, and I pay attention to
all warnings.

Is there a way make gfortran "see" that module
variables are used in a submodule?

Thanks

Anton

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-05 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05 12:21 bogus unused module variable warning Anton Shterenlikht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).