https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <[email protected]>: https://gcc.gnu.org/g:bf286563b1255868cdebc94ab59c10cfbb84a0fd commit r17-6207-gbf286563b1255868cdebc94ab59c10cfbb84a0fd Author: Paul Thomas <[email protected]> Date: Thu Nov 12 11:48:07 2026 +0000 Fortran: [PDT] (14/16) Parameterized derived type errors [PR82173] 2026-11-13 Paul Thomas <[email protected]> gcc/fortran PR fortran/82173 * expr.cc (gfc_pdt_requires_hidden_arg): Change attr.pointer to attr->class_pointer to obtain intended result. * trans-expr.cc (gfc_conv_procedure_call): Extend result copying for array transformational functions to include parameterized as well as allocatable components. For function calls that are not direct_byref, deallocate the temporary paramterized components to prevent double frees of the argument components on leaving scope. (gfc_trans_arrayfunc_assign): For array transformational like- wise deallocate paramterized components. * trans-intrinsic.cc (copy_pdt_components): New function to copy the result paramterized componts for the same reason. (gfc_conv_intrinsic_merge, gfc_conv_intrinsic_transfer): Use it. gcc/testsuite/ PR fortran/82173 * gfortran.dg/pdt_bug26.f90: New test.
