https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79824
Bug ID: 79824 Summary: [7 Regression] Failure to peel for gaps leads to read beyond mapped memory Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- Created attachment 40876 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40876&action=edit Testcase After r241959 we avoid peeling for gaps if the vector is aligned. That isn't safe because the gap itself could be vector-sized or wider. The attached testcase is based on pr49038.c and uses Richard's suggestion of __builtin_assumed_aligned.