[Bug fortran/102333] Invalid PROCEDURE statement accepted.
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 10 09:38:32 GMT 2026
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 <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:2a4f36222246480d3b66957be3582db084698a32
commit r17-3180-g2a4f36222246480d3b66957be3582db084698a32
Author: Christopher Albert <albert@tugraz.at>
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 <albert@tugraz.at>
More information about the Gcc-bugs
mailing list