https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87609
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Status|UNCONFIRMED |ASSIGNED Known to work| |4.8.5 Keywords| |wrong-code Last reconfirmed| |2018-10-15 CC| |amker at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Summary|miscompilation with |[6/7/8/9 Regression] |restrict and loop |miscompilation with | |restrict and loop Target Milestone|--- |6.5 Known to fail| |5.5.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. GCC 5 and 6 output 7 7 even. GCC 4.8 works. This is is GIMPLE level unrolling exposing non-dependence between iterations where that doesn't actually hold. We've talked about this issue when trying to expose to later passes the result of runtime dependence checks but it of course also exists when the non-dependence is recorded via restrict. We have to treat unrolling similar to inlining and re-map the base/clique sets accordingly. Versioning should be fine(?). I'll see if I can find time to address this in our generic infrastructure.