Hi all, this regression is haunting me a lot in real-world code. It's 'just' a bogus warning, but it can really swamp the output for modules with many private procedures.
I have found a fix that is rather trivial in the sense that it's a one-liner. However, it may not be as trivial conceptually (in particular I'm not 100% sure what caused this regression in the first place; it might have been the the commit for PR40973). Anyway, it regtests cleanly and fixes the problem as advertised. Ok for trunk? Cheers, Janus 2012-10-19 Janus Weil <ja...@gcc.gnu.org> PR fortran/54224 * trans-expr.c (conv_function_val): Set TREE_USED. 2012-10-19 Janus Weil <ja...@gcc.gnu.org> PR fortran/54224 * gfortran.dg/warn_unused_function.f90: New.
pr54224.diff
Description: Binary data
warn_unused_function.f90
Description: Binary data