This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37420] [4.4 Regression] -Wunused-variable broken
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Sep 2008 12:15:48 -0000
- Subject: [Bug fortran/37420] [4.4 Regression] -Wunused-variable broken
- References: <bug-37420-16146@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from burnus at gcc dot gnu dot org 2008-09-09 12:15 -------
That algorithm looks bogus:
generate_local_decl (gfc_symbol * sym)
{
if (sym->attr.flavor == FL_VARIABLE)
{
/* Check for dependencies in the array specification and string
length, adding the necessary declarations to the function. We
mark the symbol now, as well as in traverse_ns, to prevent
getting stuck in a circular dependency. */
sym->mark = 1;
[...]
else if (warn_unused_variable
&& !(sym->attr.in_common || sym->attr.use_assoc || sym->mark))
It might be that sym->mark is somewhere reset, but I don't see where; if it is
not reset then it is clear that the message is not printed.
I think it got broken by Rev. 132756:
else if (warn_unused_variable
- && !(sym->attr.in_common || sym->attr.use_assoc))
+ && !(sym->attr.in_common || sym->attr.use_assoc || sym->mark))
+2008-02-28 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/31463
+ PR fortran/33950
+ PR fortran/34296
See also:
http://gcc.gnu.org/viewcvs?view=rev&revision=132756
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37420