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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anl...@gcc.gnu.org>:

https://gcc.gnu.org/g:90b83a25b3499ff50a9b7afc0e84e1355191c220

commit r10-8939-g90b83a25b3499ff50a9b7afc0e84e1355191c220
Author: Harald Anlauf <anl...@gmx.de>
Date:   Fri Oct 16 22:17:46 2020 +0200

    PR fortran/95979 - ICE in get_kind, at fortran/simplify.c:129

    Simplification of the elemental intrinsic INDEX with constant array-valued
    arguments failed with an ICE or did not reduce to a constant array,
depending
    also on the presence of the optional KIND argument.  Add a further attempt
of
    simplification in the case of elemental intrinsics, and make sure the KIND
    argument is not removed prematurely during simplification of INDEX.

    gcc/fortran/ChangeLog:

            PR fortran/95979
            * expr.c (gfc_check_init_expr): Fix check of return code from
            gfc_intrinsic_func_interface.
            * intrinsic.c (gfc_intrinsic_func_interface): Add further attempt
            of simplification of elemental intrinsics with array arguments.
            * iresolve.c (gfc_resolve_index_func): Keep optional KIND argument
            for simplification of elemental use of INDEX.

    gcc/testsuite/ChangeLog:

            PR fortran/95979
            * gfortran.dg/index_4.f90: New test.

    (cherry picked from commit 02629b116eed7c6911ef0eb2ef97e1883e9fb1de)

Reply via email to