https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78725
--- Comment #5 from Michael Matz <matz at gcc dot gnu.org> --- (In reply to Michael Matz from comment #4) > Thanks for the second testcase as well. It's not quite the same > miscompilation > (the induction vars don't overflow), but a related one (the value of d > considered in the conditional statement is the final one after the d-loop > finishes, not the value at the use itself). Fixed with v2 of the patch, > at https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01035.html . (Btw: nice testcases, I assume they are generated somehow by a code generator that knows a bit about semantics?)