Fortran] PR 92996 – fix rank resolution EXPR_ARRAY
authorTobias Burnus <tobias@codesourcery.com>
Fri, 20 Dec 2019 11:35:20 +0000 (11:35 +0000)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 20 Dec 2019 11:35:20 +0000 (12:35 +0100)
commitde89b5748d68b76b06e3beca4a956060afb79a3d
treeff72f1c042fa19182d5953447d3c03b1c2408fdb
parente565e49fb22cb466dc8af0dc09a061b30806cc04
Fortran] PR 92996 – fix rank resolution EXPR_ARRAY

        PR fortran/92996
        gcc/fortran/
        * expr.c (simplify_parameter_variable): Call gfc_resolve_ref and
        gfc_expression_rank; fix location info.
        * gfortran.h (gfc_resolve_ref, gfc_expression_rank): Declare.
        * match.c (gfc_match_stopcode): Remove redundant setting of
        gfc_init_expr_flag; early return if gfc_simplify_expr has an error.
        * resolve.c (gfc_expression_rank): Renamed from expression_rank;
        minor cleanup.
        (gfc_resolve_ref): Removed static and renamed from resolve_ref.
        (resolve_variable, resolve_typebound_function,
        resolve_typebound_subroutine, resolve_ppc_call, resolve_expr_ppc,
        gfc_resolve_expr, resolve_procedure): Update calls.

        PR fortran/92996
        gcc/testsuite/
        * gfortran.dg/array_simplify_4.f90: New.
        * gfortran.dg/pr91565.f90: Update dg-error.
        * gfortran.dg/pr91801.f90: Likewise.

From-SVN: r279638
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_simplify_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr91565.f90
gcc/testsuite/gfortran.dg/pr91801.f90