http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54224
Bug #: 54224 Summary: [4.8 Regression] Bogus -Wunused-function warning with static function Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: koen.po...@cs.kuleuven.be Blocks: 54221 Split off from PR 54221. GCC prints for the following program with -Wunused-function: test.f90:8:0: warning: ‘hello_integer’ defined but not used [-Wunused-function] subroutine hello_integer( a ) However, the subroutine *is* used. (Note: "hello_integer" is marked with TREE_PUBLIC(...) = 0.) module mod_say_hello private :: hello_integer contains subroutine say_hello() call hello_integer(123) end subroutine say_hello subroutine hello_integer( a ) integer, intent(in) :: a print *, "Hello ", a, "!" end subroutine hello_integer end module mod_say_hello