http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60121
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(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).