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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/omp-expand.cc.jj        2023-01-02 09:32:49.399894958 +0100
+++ gcc/omp-expand.cc   2023-01-19 12:01:05.103410564 +0100
@@ -2003,8 +2003,8 @@ expand_omp_for_init_counts (struct omp_f
            t = fold_build2 (MINUS_EXPR, itype, unshare_expr (fd->loops[i].m2),
                             unshare_expr (fd->loops[i].m1));
          else if (fd->loops[i].m1)
-           t = fold_unary (NEGATE_EXPR, itype,
-                           unshare_expr (fd->loops[i].m1));
+           t = fold_build1 (NEGATE_EXPR, itype,
+                            unshare_expr (fd->loops[i].m1));
          else
            t = unshare_expr (fd->loops[i].m2);
          tree m2minusm1
fixes this, just need to play with testcases.

Reply via email to