https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051
Bug ID: 84051 Summary: missing -Warray-bounds on an out-of-bounds access via an array pointer Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- GCC used to diagnose out-of-bounds accesses made by pointers to arrays of a fixed bound. The test case below shows it can no longer do that. Clang and ICC bot detect this bug. typedef int A4[4]; int f (A4 *p) { return (*p)[7]; }