------- 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  <[EMAIL PROTECTED]>
+
+       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

Reply via email to