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

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

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

commit r16-423-ge7a2b8b76ae0c8f1e49c780aa82ebb5f0325f515
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