[Bug fortran/54224] [4.8 Regression] Bogus -Wunused-function warning with static function
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 15 18:26:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54224
--- Comment #10 from janus at gcc dot gnu.org 2012-09-15 18:26:27 UTC ---
(In reply to comment #8)
> > Here is a patch which should set TREE_USED for all procedure calls:
>
> Does it still allow to optimize unused PRIVATE module procedures away?
I think so. conv_function_val is only called by gfc_conv_procedure_call. If the
procedure is really not used, then gfc_conv_procedure_call will not be called,
and thus also TREE_USED will not be set.
Moreover, the patchlet in comment 7 seems to be free of testsuite regressions.
More information about the Gcc-bugs
mailing list