https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121805
--- Comment #5 from federico <federico.perini at gmail dot com> --- Thanks a lot for checking this Steve. I re-enabled the loop version to see what it does in the tree dump and I see ``` loop_sum = idx[(integer(kind=8)) *(integer(kind=4) *) (dd.data + (sizetype) ((dd.offset + (integer(kind=8)) i * dd.dim[0].stride) * dd.span)) + -1] + loop_sum; ``` Compared to the array version ``` integer(kind=4) D.3058; D.3058 = *(integer(kind=4) *) (dd.data + (sizetype) ((dd.dim[0].stride * NON_LVALUE_EXPR <S.3>) * 4)); val.2 = idx[(integer(kind=8)) D.3058 + -1] + val.2; ``` from my limited understanding the array version does not have a `dd.offset + ` term that was set as `dd.offset = -1;`, but also the loop address is multiplied `*4` in the array version but `*dd.span` in the loop version (is that because the loop variable is 8-byte vs. 4-byte perhaps?)