https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105198
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Reduced testcase for the predictive commoning issue, fails with -O3 or -O2 -fno-tree-pre -fpredictive-commoning static __attribute__ ((noipa)) void next_set(int *x, int n, int k) { int j, tmp; j = k - 1; tmp = x[j]++; while(j > 0 && x[j] >= n - (k - 1 -j)) { j--; x[j]++; tmp = x[j]; } if (tmp != 2 || j != 1 || x[0] != 0 || x[1] != 2 || x[2] != 5) __builtin_abort (); } int main() { int x[3] = {0, 1, 4}; next_set(x, 5, 3); return 0; }