aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2012-11-26 12:16:31 +0100
committerJanus Weil <janus@gcc.gnu.org>2012-11-26 12:16:31 +0100
commit29be7510afa5761eb64db71df7ef8b2d2d57d8cf (patch)
tree9eb2f79f7f351d91466677ca64aaf9814e387c4d /gcc/fortran/parse.c
parent3383b7fa4051d9b7cdc6dc11cfd3d821d3fd9cc7 (diff)
downloadgcc-29be7510afa5761eb64db71df7ef8b2d2d57d8cf.zip
gcc-29be7510afa5761eb64db71df7ef8b2d2d57d8cf.tar.gz
gcc-29be7510afa5761eb64db71df7ef8b2d2d57d8cf.tar.bz2
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
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index f31e309..659e9fc 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -3928,7 +3928,6 @@ gfc_fixup_sibling_symbols (gfc_symbol *sym, gfc_namespace *siblings)
gfc_symtree *st;
gfc_symbol *old_sym;
- sym->attr.referenced = 1;
for (ns = siblings; ns; ns = ns->sibling)
{
st = gfc_find_symtree (ns->sym_root, sym->name);
@@ -4050,7 +4049,6 @@ parse_contained (int module)
/* Mark this as a contained function, so it isn't replaced
by other module functions. */
sym->attr.contained = 1;
- sym->attr.referenced = 1;
/* Set implicit_pure so that it can be reset if any of the
tests for purity fail. This is used for some optimisation