https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57832

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #6)
> In the reduced test cases (in comment #3 and comment #4) d is a global
> variable so it's value is zero.  c is assigned in the first iteration of the
> loop (when e is zero) and used in subsequent iterations when it has a
> defined value, so the warning .seems like a clear false postive to me.  (I
> didn't look at the big test case.)

Oh, yes! Sorry, my comment didn't make sense. Even simpler:

int a, d;

void f (void)
{
  int c;
  for (int e = 0; e < 64; e += 6)
    {
      if (e == 0)
            c = d;
      else 
            a += c;
    }
}

Reply via email to