http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49038
Summary: -ftree-vectorise introduces reads past end of array Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rsand...@gcc.gnu.org Created attachment 24276 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24276 Test case The vectoriser has support for interleaved loads with gaps, such as: ...a[n*4] ...a[n*4+1] ...a[n*4+2] It implements this by loading blocks of 4*vectfactor elements from a[], then permuting them. However, it doesn't seem to check whether the gap elements are provably loadable. The attached testcase segfaults on x86_64-linux-gnu with -O2 -ftree-vectorize, but works with plain -O2.