[Bug fortran/123253] [16 regression] rejection of valid code
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 22 21:44:11 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123253
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:692ca18d491ec2337f50a1788866106dcb597901
commit r16-6341-g692ca18d491ec2337f50a1788866106dcb597901
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Dec 22 21:05:29 2025 +0100
Fortran: fix variable definition context checks for SELECT TYPE [PR123253]
Commit r16-6300 introduced a regression when checking the variable
definition context of SELECT TYPE variables where the selector was not a
dummy argument as the scan for the association target was too shallow.
Scan through association lists for the ultimate selector.
PR fortran/123253
gcc/fortran/ChangeLog:
* expr.cc (gfc_check_vardef_context): Replace simple check by a
scan through the association targets for a dummy argument.
gcc/testsuite/ChangeLog:
* gfortran.dg/associate_76.f90: Extended testcase.
* gfortran.dg/associate_77.f90: New test.
More information about the Gcc-bugs
mailing list