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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Mark Eggleston
<markeggles...@gcc.gnu.org>:

https://gcc.gnu.org/g:15e518600a9ef82b55d2ec75d8d41d767132f475

commit r8-10261-g15e518600a9ef82b55d2ec75d8d41d767132f475
Author: Mark Eggleston <markeggles...@gcc.gnu.org>
Date:   Thu May 7 08:02:02 2020 +0100

    Fortran  : ProcPtr function results: 'ppr@' in error message PR39695

    The value 'ppr@' is set in the name of result symbol, the actual
    name of the symbol is in the procedure name symbol pointed
    to by the result symbol's namespace (ns). When reporting errors for
    symbols that have the proc_pointer attribute check whether the
    result attribute is set and set the name accordingly.

    Backport from master.

    2020-05-20  Mark Eggleston  <markeggles...@gcc.gnu.org>

    gcc/fortran/

            PR fortran/39695
            * resolve.c (resolve_fl_procedure): Set name depending on
            whether the result attribute is set.  For PROCEDURE/RESULT
            conflict use the name in sym->ns->proc_name->name.
            * symbol.c (gfc_add_type): Add check for function and result
            attributes use sym->ns->proc_name->name if both are set.
            Where the symbol cannot have a type use the name in
            sym->ns->proc_name->name.

    2020-05-20  Mark Eggleston  <markeggles...@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/39695
            * gfortran.dg/pr39695_1.f90: New test.
            * gfortran.dg/pr39695_2.f90: New test.
            * gfortran.dg/pr39695_3.f90: New test.
            * gfortran.dg/pr39695_4.f90: New test.

            (cherry picked from commit
eb069ae8819c3a84d7f78becc5501e21ee3a9554)

Reply via email to