https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109846
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:fa0569e90efe8a5cb895a3f50dd502f849940828 commit r14-863-gfa0569e90efe8a5cb895a3f50dd502f849940828 Author: Harald Anlauf <anl...@gmx.de> Date: Sun May 14 21:53:51 2023 +0200 Fortran: CLASS pointer function result in variable definition context [PR109846] gcc/fortran/ChangeLog: PR fortran/109846 * expr.cc (gfc_check_vardef_context): Check appropriate pointer attribute for CLASS vs. non-CLASS function result in variable definition context. gcc/testsuite/ChangeLog: PR fortran/109846 * gfortran.dg/ptr-func-5.f90: New test.