https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82843
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:fbaaefa0ce25f88802e5dc34821bc95211f309ba commit r16-3424-gfbaaefa0ce25f88802e5dc34821bc95211f309ba Author: Paul Thomas <pa...@gcc.gnu.org> Date: Thu Aug 28 08:17:14 2025 +0100 Fortran: Constructors with PDT components did not work [PR82843] 2025-08-28 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/82843 * intrinsic.cc (gfc_convert_type_warn): If the 'from_ts' is a PDT instance, copy the derived type to the target ts. * resolve.cc (gfc_resolve_ref): A PDT component in a component reference can be that of the pdt_template. Unconditionally use component of the PDT instance to ensure that the backend_decl is set during translation. Likewise if a component is encountered that is a PDT template type, use the component parmeters to convert to the correct PDT instance. gcc/testsuite/ PR fortran/82843 * gfortran.dg/pdt_40.f03: New test.