]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: CLASS pointer function result in variable definition context [PR109846]
authorHarald Anlauf <anlauf@gmx.de>
Sun, 14 May 2023 19:53:51 +0000 (21:53 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 15 May 2023 17:27:25 +0000 (19:27 +0200)
commitfa0569e90efe8a5cb895a3f50dd502f849940828
treefa47f9aff520389a606bc0f546c65995c965e51a
parent76e11280e79c5dd5089c17d5726cae9a5a21bc2e
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.
gcc/fortran/expr.cc
gcc/testsuite/gfortran.dg/ptr-func-5.f90 [new file with mode: 0644]