http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54695
Bug #: 54695 Summary: Bogus warning for module variable in USE statement with -Wall Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: spam.brian.tay...@gmail.com Created attachment 28263 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28263 Fortran source file that generates bogus warning when compiled with -Wall When compiled with -Wall, gfortran gives a bogus warning with the attached code. Clearly, the module variable "b" has not been imported, yet gfortran warns about it being explicitly imported. This only seems to be triggered by module variables that are stored in common blocks. user@host $ gfortran-4.7 -Wall -c bogus_warning.f90 bogus_warning.f90:8.4: use mod, only: a 1 Warning: Unused module variable 'b' which has been explicitly imported at (1) user@host $ gfortran-4.7 --version GNU Fortran (GCC) 4.7.0 Copyright (C) 2012 Free Software Foundation, Inc. user@host $ uname -a Darwin MBP.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64