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

--- Comment #26 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mikael Morin <mik...@gcc.gnu.org>:

https://gcc.gnu.org/g:053cec9a5f4513537ca20a246c39d1bbfe6ce4be

commit r15-3757-g053cec9a5f4513537ca20a246c39d1bbfe6ce4be
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Sat Sep 21 18:32:19 2024 +0200

    fortran: Disable frontend passes for inlinable MINLOC/MAXLOC [PR90608]

    Disable rewriting of MINLOC/MAXLOC expressions for which inline code
    generation is supported.  Update the gfc_inline_intrinsic_function_p
    predicate (already existing) for that, with the current state of
    MINLOC/MAXLOC inlining support, that is only the cases of a scalar
    result and non-CHARACTER argument for now.

    This change has no effect currently, as the MINLOC/MAXLOC front-end passes
    only change expressions of rank 1, but the inlining control predicate
    gfc_inline_intrinsic_function_p returns false for those.  However, later
    changes will extend MINLOC/MAXLOC inline expansion support to array
    expressions and update the inlining control predicate, and this will become
    effective.

            PR fortran/90608

    gcc/fortran/ChangeLog:

            * frontend-passes.cc (optimize_minmaxloc): Skip if we can generate
            inline code for the unmodified expression.
            * trans-intrinsic.cc (gfc_inline_intrinsic_function_p): Add
            MINLOC and MAXLOC cases.

Reply via email to