http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997
Bug #: 54997 Summary: -Wunused-function gives false warnings for procedures passed as actual argument Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org Follow-up to PR54224: module m implicit none private :: s2,s3 contains subroutine s1 call s2(s3) end subroutine subroutine s2(dummy) procedure() :: dummy end subroutine subroutine s3() end subroutine end module When compiled with -Wunused-function, this gives: warning: ‘s3’ defined but not used [-Wunused-function] subroutine s3() Obviously s3 is not being called directly, but it is passed to s2, so it's certainly not unused.