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

--- Comment #27 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <[email protected]>:

https://gcc.gnu.org/g:2a4f36222246480d3b66957be3582db084698a32

commit r17-3180-g2a4f36222246480d3b66957be3582db084698a32
Author: Christopher Albert <[email protected]>
Date:   Mon Aug 10 03:10:52 2026 +0200

    fortran: Diagnose allocatable PROCEDURE results early [PR102333]

    A function result declared by a PROCEDURE statement can be redirected
    to a hidden procedure pointer result before attribute conflicts are
    checked.  Check the PROCEDURE and ALLOCATABLE conflict before this
    redirection so the original attributes produce the correct diagnostic.

    Fixes #7

    Assisted-by: GPT-5.6-sol (OpenAI)

            PR fortran/102333

    gcc/fortran/ChangeLog:

            * decl.cc (match_procedure_decl): Diagnose the PROCEDURE and
            ALLOCATABLE conflict before creating a hidden result.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr102333_2.f90: New test.

    Signed-off-by: Christopher Albert <[email protected]>

Reply via email to