https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112281
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- -fno-tree-loop-distribution fixes the issue. Looks like loop distribution is pulling out the assignment of `b = d[c + 1];` from the loop even though the loop does assignment to a field of that `d[c + 1].a = 0;`.