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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>:

https://gcc.gnu.org/g:ac2949574da9a668daad421d7edb79f172f73c6f

commit r13-5756-gac2949574da9a668daad421d7edb79f172f73c6f
Author: Tobias Burnus <tob...@codesourcery.com>
Date:   Thu Feb 9 15:51:13 2023 +0100

    OpenMP/Fortran: Partially fix non-rect loop nests [PR107424]

    This patch ensures that loop bounds depending on outer loop vars use the
    proper TREE_VEC format. It additionally gives a sorry if such an outer
    var has a non-one/non-minus-one increment as currently a count variable
    is used in this case (see PR).

    Finally, it avoids 'count' and just uses a local loop variable if the
    step increment is +/-1.

            PR fortran/107424

    gcc/fortran/ChangeLog:

            * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
            'non_unit_incr' members.
            (gfc_nonrect_loop_expr): New.
            (gfc_trans_omp_do): Call it; use normal loop bounds
            for unit stride - and only create local loop var.

    libgomp/ChangeLog:

            * testsuite/libgomp.fortran/non-rectangular-loop-1.f90: New test.
            * testsuite/libgomp.fortran/non-rectangular-loop-1a.f90: New test.
            * testsuite/libgomp.fortran/non-rectangular-loop-2.f90: New test.
            * testsuite/libgomp.fortran/non-rectangular-loop-3.f90: New test.
            * testsuite/libgomp.fortran/non-rectangular-loop-4.f90: New test.
            * testsuite/libgomp.fortran/non-rectangular-loop-5.f90: New test.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/goacc/privatization-1-compute-loop.f90: Update
dg-note.
            * gfortran.dg/goacc/privatization-1-routine_gang-loop.f90:
Likewise.
  • [Bug fortran/107424] [13 Regres... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to