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.