[Bug fortran/71565] INTENT(IN) polymorphic argument with pointer components - reject valid code

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 19 21:42:49 GMT 2025


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

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

https://gcc.gnu.org/g:05f9824f44f088f4afa02f03063d638c787162c5

commit r16-6300-g05f9824f44f088f4afa02f03063d638c787162c5
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Fri Dec 19 21:15:44 2025 +0100

    Fortran: INTENT(IN) polymorphic argument with pointer components [PR71565]

            PR fortran/71565

    gcc/fortran/ChangeLog:

            * expr.cc (gfc_check_vardef_context): Fix treatment of INTENT(IN)
            checks for ASSOCIATE variables.  Correct checking of PROTECTED
            objects, as subobjects inherit the PROTECTED attribute.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/protected_8.f90: Adjust patterns.
            * gfortran.dg/associate_76.f90: New test.


More information about the Gcc-bugs mailing list