[Bug fortran/95837] derived-type components of character kind=4 – wrong code with component access (kind=4 ignored)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 25 14:59:03 GMT 2020


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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:f48bffe70cba310461ec19ffcd07c573a6b86575

commit r11-1654-gf48bffe70cba310461ec19ffcd07c573a6b86575
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Jun 25 16:57:08 2020 +0200

    Fortran: Fix character-kind=4 substring resolution (PR95837)

    Testing showed that it is always set and its value matches
    always ts->kind (if available) or otherwise, if it is a variable,
    the sym->ts.kind.

    gcc/fortran/ChangeLog:

            PR fortran/95837
            * resolve.c (gfc_resolve_substring_charlen): Remove
            bogus ts.kind setting for the expression.

    gcc/testsuite/ChangeLog:

            PR fortran/95837
            * gfortran.dg/char4-subscript.f90: New test.


More information about the Gcc-bugs mailing list