[Bug middle-end/54224] New: [4.8 Regression] Bogus -Wunused-function warning with static function
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 10 15:44:00 GMT 2012
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: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: koen.poppe@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
More information about the Gcc-bugs
mailing list