https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121422
Bug ID: 121422 Summary: [16 Regression] wrong code for proping zero incorrectly Product: gcc Version: 14.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- testcase: ``` struct s1 { char a[4]; }; struct s1 b; char t[4]; __attribute__((noipa,noinline)) void f(void) { b = (struct s1){}; b.a[3] = 1; __builtin_memcpy(&t[0], &b.a[1], 3*sizeof(t[0])); } int main() { f(); for(int i = 0; i < 4; i++) { if (t[i] != (i == 2 ? 1 : 0)) __builtin_abort(); } } ```