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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>:

https://gcc.gnu.org/g:3cef53a4d4ff44a5b61284bb0e6977f7ba7b3aab

commit r15-7165-g3cef53a4d4ff44a5b61284bb0e6977f7ba7b3aab
Author: Harald Anlauf <anl...@gmx.de>
Date:   Wed Jan 22 22:44:39 2025 +0100

    Fortran: do not evaluate arguments of MAXVAL/MINVAL too often [PR118613]

            PR fortran/118613

    gcc/fortran/ChangeLog:

            * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxval): Adjust
algorithm
            for inlined version of MINLOC and MAXLOC so that arguments are only
            evaluted once, and create temporaries where necessary.  Document
            change of algorithm.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/maxval_arg_eval_count.f90: New test.

Reply via email to