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

--- Comment #5 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:386f6d98ba0d438d65da1ad5b203f7b2743fc6da

commit r15-5414-g386f6d98ba0d438d65da1ad5b203f7b2743fc6da
Author: Harald Anlauf <anl...@gmx.de>
Date:   Sun Nov 17 23:04:58 2024 +0100

    Fortran: add bounds-checking for ALLOCATE of CHARACTER with type-spec
[PR53357]

    Fix a rejects-(potentially)-valid code for ALLOCATE of CHARACTER with
    type-spec, and implement a string-length check for -fcheck=bounds.
    Implement more detailed errors or warnings when character function
    declarations and references do not match.

            PR fortran/53357

    gcc/fortran/ChangeLog:

            * dependency.cc (gfc_dep_compare_expr): Return correct result if
            relationship of expressions could not be determined.
            * interface.cc (gfc_check_result_characteristics): Implement error
            messages if character function declations and references do not
            agree, else emit warning in cases where a mismatch is suspected.
            * trans-stmt.cc (gfc_trans_allocate): Implement a string length
            check for -fcheck=bounds.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/auto_char_len_4.f90: Adjust patterns.
            * gfortran.dg/typebound_override_1.f90: Likewise.
            * gfortran.dg/bounds_check_strlen_10.f90: New test.

Reply via email to