This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran] PR 54224: [4.8 Regression] Bogus -Wunused-function warning with static function


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  <janus@gcc.gnu.org>

	PR fortran/54224
	* trans-expr.c (conv_function_val): Set TREE_USED.

2012-10-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54224
	* gfortran.dg/warn_unused_function.f90: New.

Attachment: pr54224.diff
Description: Binary data

Attachment: warn_unused_function.f90
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]