re PR fortran/54997 (-Wunused-function gives false warnings)
authorJanus Weil <janus@gcc.gnu.org>
Mon, 26 Nov 2012 11:16:31 +0000 (12:16 +0100)
committerJanus Weil <janus@gcc.gnu.org>
Mon, 26 Nov 2012 11:16:31 +0000 (12:16 +0100)
commit29be7510afa5761eb64db71df7ef8b2d2d57d8cf
tree9eb2f79f7f351d91466677ca64aaf9814e387c4d
parent3383b7fa4051d9b7cdc6dc11cfd3d821d3fd9cc7
re PR fortran/54997 (-Wunused-function gives false warnings)

2012-11-26  Janus Weil  <janus@gcc.gnu.org>

PR fortran/54997
* decl.c (match_procedure_decl): Don't set 'referenced' attribute
for PROCEDURE declarations.
* parse.c (gfc_fixup_sibling_symbols,parse_contained): Don't set
'referenced' attribute for all contained procedures.
* trans-decl.c (gfc_get_symbol_decl): Allow for unreferenced procedures.
(build_function_decl): Set TREE_USED for referenced procedures.

2012-11-26  Janus Weil  <janus@gcc.gnu.org>

PR fortran/54997
* gfortran.dg/warn_unused_function_2.f90: New.

From-SVN: r193811
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/parse.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/warn_unused_function_2.f90 [new file with mode: 0644]