http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39757
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-02 20:41:15 UTC --- We have: short last[3] = { 16,16,16 }, mul[3], buf[3][3][386]; for (i=0; i < sizeof(buf)/sizeof(short); i++) buf[0][0][i] = 2048; Obviously this where one of the warning happens. Likewise for: float cfilt=0, ddft[3][3][2], ppm[3][3][3]; >For one, the compiler considers it an issues that array cam_xyz[4][3] is accessed as cam_xyz[0][j], 0 <= j < 12. This issue is found with -O3 but not with -O2. That warning is correct. Now for the other part, this warning really depends on optimization and is not always 100% of producing all the warnings it could.