[Bug middle-end/69230] valid -Wmaybe-uninitialized suppressed by -O2
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 11 20:06:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69230
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The glibc test case is actually closer to the following (I had made a typo in
the bitwise AND expression). When (i == 4), j is never assigned to.
int foo (int i)
{
int j;
switch (i & 3) {
case 0: j = 1; break;
case 1: j = 2; break;
case 2: j = 3; break;
case 3: j = 4; break;
}
return j + 1;
}
For reference, an example of glibc code where this causes a problem is here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/ieee754/dbl-64/e_jn.c#l103
More information about the Gcc-bugs
mailing list