https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96198

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think
--- gcc/omp-general.c.jj        2020-07-14 12:20:01.520110629 +0200
+++ gcc/omp-general.c   2020-07-14 20:54:48.104237522 +0200
@@ -726,7 +726,7 @@ omp_extract_for_data (gomp_for *for_stmt
              if (loop->m1 || loop->m2)
                {
                  gcc_assert (single_nonrect != -1);
-                 if (single_nonrect_cond_code == LT_EXPR)
+                 if (1 || single_nonrect_cond_code == LT_EXPR)
                    {
                      n1 = n1first;
                      n2 = n2first;
@@ -764,7 +764,7 @@ omp_extract_for_data (gomp_for *for_stmt
                  m1 = fold_convert (itype, m1);
                  m2 = fold_convert (itype, m2);
                  tree t2;
-                 if (single_nonrect_cond_code == LT_EXPR)
+                 if (1 || single_nonrect_cond_code == LT_EXPR)
                    t2 = fold_build2 (MINUS_EXPR, itype, m2, m1);
                  else
                    t2 = fold_build2 (MINUS_EXPR, itype, m1, m2);
should fix that, but need to go back to drawing board and see if that is how we
want to handle those cases.  That said at least for all the testcases in the
testsuite it currently computes the right number of iterations at least.

Reply via email to