https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82286
Bug ID: 82286 Summary: Wrong array subscript is above array bounds Product: gcc Version: 7.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: hermantenbrugge at home dot nl Target Milestone: --- Created attachment 42223 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42223&action=edit testcase The attached testcase reports array bound error if compiled with: gcc -O3 -Wall -c tst.c -DERROR tst.c: In function 'mtrx_decompose_matrix': tst.c:36:17: warning: array subscript is above array bounds [-Warray-bounds] sum += tmp.data[row][sub] * tmp.data[col][sub]; ~~~~~~~~^~~~~ If -DERROR is not given the testcase compiles with no warning.