https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jakub at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue here is the induction variable is shared? <bb 5>: # _17 = PHI <0(2), _11(4)> _6 = b[_17]; _7 = c[_17]; _8 = _6 + _7; a[_17] = _8; _10 = .omp_data_i_3(D)->i; _11 = _10 + 1; .omp_data_i_3(D)->i = _11; if (_11 <= 9999999) goto <bb 4>; else goto <bb 3>; and we didn't apply store-motion to it: Memory reference 1: b[_17] Memory reference 2: c[_17] Memory reference 3: a[_17] Memory reference 4: .omp_data_i_3(D)->i ... Querying dependency of refs 4 and 1: dependent. Querying dependencies of ref 4 in loop 1: dependent I think the static chain never points to global decls thus we could special-case this. We could also treat members of the frame as non-allocated and thus not worry about trailing arrays and such. Unfortunately the .omp_data_i is a regular function parameter and not a static chain :/