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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Thomas Koenig
<tkoe...@gcc.gnu.org>:

https://gcc.gnu.org/g:7b38bab21a126512c17c8084ad78b6bf75fc1437

commit r15-9650-g7b38bab21a126512c17c8084ad78b6bf75fc1437
Author: Thomas Koenig <tkoe...@gcc.gnu.org>
Date:   Tue May 6 18:05:41 2025 +0200

    Fix PR 119928, formal arguments used to wrongly inferred for CLASS.

    The problem was indeed that generating a formal from an actual
    arglist is a bad idea when classes are involved.  Fixed in the
    attached patch.  I think it still makes sense to remove the checks
    when the other attributes are present (or PR96073 may come back
    in different guise, even if I have to test case at present).
    I have also converted the test to a run-time check.

    gcc/fortran/ChangeLog:

            PR fortran/119928
            * interface.cc (gfc_check_dummy_characteristics): Do not issue
            error if one dummy symbol has been generated from an actual
            argument and the other one has OPTIONAL, INTENT, ALLOCATABLE,
            POINTER, TARGET, VALUE, ASYNCHRONOUS or CONTIGUOUS.
            (gfc_get_formal_from_actual_arglist): Do nothing if symbol
            is a class.

    gcc/testsuite/ChangeLog:

            PR fortran/119928
            * gfortran.dg/interface_60.f90: New test.

Reply via email to