http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60121

--- Comment #8 from Chengnian Sun <chengniansun at gmail dot com> ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Chengnian Sun from comment #6)
> > The test case can be further reduced to the following code, which is NOT
> > dead or dependent on bug 60115. 
> > 
> > int b[1];
> > int f() {
> >   return b[9999];
> > }
> 
> Because we don't warn in the front-end.  That was on purpose.  I can find
> the old bug reports of why we don't want to warn in the front-end.  The
> warning only happens in VPR which is only enabled for -O2 and above (-Os is
> -O2 plus optimize for size really).

Thanks. Is it possible to enable vrp with -ftree-vrp at -O0 level? Therefore
the user can get this warning even when the code is not optimized?

Reply via email to