Commit ce738b86 by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/15510 (Should not warn about unused variables from used modules)

PR fortran/15510
* trans-deecl.c (generate_local_decl): Do not issue warning for
unused variables if they're use associated.

Co-Authored-By: Andrew Vaught <andyv@firstinter.net>

From-SVN: r83113
parent 7c82a41e
2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15510
* trans-deecl.c (generate_local_decl): Do not issue warning for
unused variables if they're use associated.
2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
Andrew Vaught <andyv@firstinter.net> Andrew Vaught <andyv@firstinter.net>
PR fortran/14928 PR fortran/14928
......
...@@ -1921,9 +1921,10 @@ generate_local_decl (gfc_symbol * sym) ...@@ -1921,9 +1921,10 @@ generate_local_decl (gfc_symbol * sym)
warning ("unused parameter `%s'", sym->name); warning ("unused parameter `%s'", sym->name);
} }
/* warn for unused variables, but not if they're inside a common /* warn for unused variables, but not if they're inside a common
block. */ block or are use_associated. */
else if (warn_unused_variable && !sym->attr.in_common) else if (warn_unused_variable
warning ("unused variable `%s'", sym->name); && !(sym->attr.in_common || sym->attr.use_assoc))
warning ("unused variable `%s'", sym->name);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment