]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix recursive PDT function invocation [PR122433, PR122434]
authorPaul Thomas <pault@gcc.gnu.org>
Wed, 29 Oct 2025 09:20:24 +0000 (09:20 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Wed, 29 Oct 2025 09:20:24 +0000 (09:20 +0000)
commit46dcc8e575c7043aa5cd7ff02ac83e390a70c50f
tree0e0a01574f0c4406c1a3f73e331ba4ded80191a7
parentdbd0e8fc50e990e999217cc3a2fc5b6fbc74a09d
Fortran: Fix recursive PDT function invocation [PR122433, PR122434]

2025-10-29  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/122433
* decl.cc (gfc_get_pdt_instance): Prevent a PDT component of
the same type as the template from being converted into an
instance.

PR fortran/122434
* resolve.cc (gfc_impure_variable): The result of a pure
function is a valid allocate object since it is pure.

gcc/testsuite/
PR fortran/122433
* gfortran.dg/pdt_62.f03: New test.

PR fortran/122434
* gfortran.dg/pdt_63.f03: New test.
gcc/fortran/decl.cc
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/pdt_62.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pdt_63.f03 [new file with mode: 0644]