https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
--- Comment #13 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:40c4b9dcd9be3e63f8e4f6e4e49cdcd341764082 commit r17-5389-g40c4b9dcd9be3e63f8e4f6e4e49cdcd341764082 Author: Paul Thomas <[email protected]> Date: Tue Oct 20 11:54:40 2026 +0100 Fortran: [PDT] (6/16) Parameterized derived type errors [PR82173] 2026-10-20 Paul Thomas <[email protected]> assisted by Claude Haiku <[email protected]> gcc/fortran PR fortran/82173 * gfortran.h: Add param_list field to gfc_code allocate structure. Add extern declaration for gfc_get_temp_from_expr wrapper. * match.cc (gfc_match_class_is): Clear global type_param_spec_list before matching derived type spec to prevent residual state corruption in assumed parameter CLASS IS matching. Compute hash_value for CLASS IS cases to prevent collisions. * resolve.cc (resolve_allocate_expr): Add PDT instantiation from allocate-typespec parameters. Skip vtab lookup for PDT templates which don't have vtabs. Add macros for CLASS IS case comparison to prevent double-definition errors. * trans-stmt.cc: Add convert_structure_to_type_list and build_param_list_from_expr functions for PDT parameter handling. Update allocate_get_initializer to handle PDT types. Improve gfc_trans_allocate to properly handle PDT initialization with temporary deallocation. Add include for constructor.h. gcc/testsuite/ PR fortran/82173 * gfortran.dg/pdt_bug9.f90: New test. * gfortran.dg/pdt_bug10.f90: New test.
