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

--- Comment #29 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:5999d558e74b3531536c74976e8f05bb3ed31335

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

    fortran: Inline integral MINLOC/MAXLOC with no DIM and scalar MASK
[PR90608]

    Enable the generation of inline code for MINLOC/MAXLOC when argument ARRAY
    is of integral type, DIM is not present, and MASK is present and is scalar
    (only absent MASK or rank 1 ARRAY were inlined before).

    Scalar masks are implemented with a wrapping condition around the code one
    would generate if MASK wasn't present, so they are easy to support once
    inline code without MASK is working.

            PR fortran/90608

    gcc/fortran/ChangeLog:

            * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Generate
            variable initialization for each dimension in the else branch of
            the toplevel condition.
            (gfc_inline_intrinsic_function_p): Return TRUE for scalar MASK.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/maxloc_bounds_7.f90: Additionally accept the error
message
            reported by the scalarizer.

Reply via email to