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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-10-09
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Hopefully reduced to something reasonable:

$ cat pr57832.c
int a, b, d;
void f() {
  unsigned c;
  for (int e = 0; e < 64; e += 6) {
    b = e ?: (c = d);
    a += e ? 9 + c + e : 0;
  }
}

$ gcc -mtune=atom -O2 -Werror=maybe-uninitialized pr57832.c -c
pr57832.c: In function ‘f’:
pr57832.c:3:12: error: ‘c’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   unsigned c;
            ^
cc1: some warnings being treated as errors

$ gcc -O2 -Werror=maybe-uninitialized pr57832.c -c
[nothing]

Reply via email to