[Bug fortran/27318] gfortran should warn if a interface does not match

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 5 18:15:07 GMT 2020


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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:

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

commit r11-1814-gcc9a9229285a26ac12bc8de53237ce9c4d42f867
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Sun Jul 5 20:11:35 2020 +0200

    Test global identifiers against what is specified interfaces.

    Apart from calling gfc_compare_interfaces to check interfaces against
    global identifiers, this also sets and check a few sym->error flags
    to avoid duplicate error messages.  I thought about issuing errors
    on mismatched interfaces, but when the procedure is not invoked,
    a warning should be enough to alert the user.

    gcc/fortran/ChangeLog:

            PR fortran/27318
            * frontend-passes.c (check_against_globals): New function.
            (gfc_check_externals): Split; also invoke check_against_globals
            via gfc_traverse_ns.
            (gfc_check_externals0): Recursive part formerly in
            gfc_check_externals.
            * resolve.c (resolve_global_procedure): Set sym->error on
            interface mismatch.
            * symbol.c (ambiguous_symbol): Check for, and set sym->error.

    gcc/testsuite/ChangeLog:

            PR fortran/27318
            * gfortran.dg/error_recovery_1.f90: Adjust test case.
            * gfortran.dg/use_15.f90: Likewise.
            * gfortran.dg/interface_47.f90: New test.


More information about the Gcc-bugs mailing list