https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103371
--- Comment #7 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:57aca7d7f8c4317288e708aa9e20ab88179c8c66 commit r16-5848-g57aca7d7f8c4317288e708aa9e20ab88179c8c66 Author: Paul Thomas <[email protected]> Date: Wed Dec 3 09:40:26 2025 +0000 Fortran: Implement finalization PDTs [PR103371] 2025-12-03 Paul Thomas <[email protected]> gcc/fortran PR fortran/103371 * decl.cc (gfc_get_pdt_instance): Remove the requirement that PDT components be of the same type as the enclosing type. Apply initializers other than the default to PDT components. * primary.cc (gfc_match_rvalue): Make combination of the two actual_arglists conditional on 'type_spec_list' having been seen as well together with applying component names to all the arguments. * trans-decl.cc (gfc_init_default_dt): Add 'pdt_ok' to the args and use it to signal that a PDT can be default initialized. (gfc_init_default_pdt): New function to check that a pdt is OK for default intialization before calling gfc_init_default_dt. (gfc_trans_deferred_vars): Use gfc_init_default_pdt. * trans.h: Add bool 'pdt_ok' to prototype with defaul value of false. gcc/testsuite PR fortran/103371 * gfortran.dg/pdt_71.f03: New test.
