[Bug fortran/94090] ICE on mismatched interface

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 17 17:54:09 GMT 2020


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

--- Comment #4 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:2298af0800b292f028298c1eaec42fd3033c4b9b

commit r10-7778-g2298af0800b292f028298c1eaec42fd3033c4b9b
Author: Thomas König <tkoenig@gcc.gnu.org>
Date:   Fri Apr 17 19:53:45 2020 +0200

    Fix ICE on invalid, PR94090.

    The attached patch fixes an ICE on invalid: When the return type of
    a function was misdeclared with a wrong rank, we issued a warning,
    but not an error (unless with -pedantic); later on, an ICE ensued.

    Nothing good can come from wrongly declaring a function type
    (considering the ABI), so I changed that into a hard error.

    2020-04-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

            PR fortran/94090
            * gfortran.dg (gfc_compare_interfaces): Add
            optional argument bad_result_characteristics.
            * interface.c (gfc_check_result_characteristics): Fix
            whitespace.
            (gfc_compare_interfaces): Handle new argument; return
            true if function return values are wrong.
            * resolve.c (resolve_global_procedure): Hard error if
            the return value of a function is wrong.

    2020-04-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

            PR fortran/94090
            * gfortran.dg/interface_46.f90: New test.


More information about the Gcc-bugs mailing list