--- Comment #6 from rguenth at gcc dot gnu dot org 2007-03-07 09:39 ---
Uh, yes. So let's teach CCP to convert a[110]++; to builtin_trap then ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31058
--- Comment #5 from rakdver at atrey dot karlin dot mff dot cuni dot cz
2007-03-07 09:38 ---
Subject: Re: bogus array overflow warnings in unreachable code
> But real length of a cannot be greater than 100. I guess VRP could be
> improved
> to derive a value range for x in this case
--- Comment #4 from rguenth at gcc dot gnu dot org 2007-03-07 09:33 ---
But real length of a cannot be greater than 100. I guess VRP could be improved
to derive a value range for x in this case ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31058
--- Comment #3 from rakdver at gcc dot gnu dot org 2007-03-07 09:15 ---
The same problem appears in the following testcase.
int a[100];
void test (int real_length_of_a)
{
int x = 110;
if (x < real_length_of_a)
a[x]++;
}
--
rakdver at gcc dot gnu dot org changed: