[Bug tree-optimization/71433] [7 Regression] -Warray-bounds false positive with -O2
vincent-gcc at vinc17 dot net
gcc-bugzilla@gcc.gnu.org
Mon Jun 6 15:03:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71433
--- Comment #2 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
Well, this test case also yields a warning with 20160508-1 (trunk r236009).
Here's a new test case that yields no warnings with 20160508-1, but yields one
with 20160603-1 (r237077).
int t[1];
int a (void);
int fct (int r, long e, int neg)
{
int d = 0;
if (r == 4)
r = neg ? 3 : 2;
if (e < -52)
d = r == 0 && a () ? 1 : 2;
else
{
int i, n = 53;
if (e < 0)
n += e;
for (i = 1 ; i < n / 64 + 1 ; i++)
d = t[i];
}
return d;
}
More information about the Gcc-bugs
mailing list