https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121398
--- Comment #6 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:2aac5a6fa777753277216b30c3d8aa0f6c277f55 commit r16-3135-g2aac5a6fa777753277216b30c3d8aa0f6c277f55 Author: Paul Thomas <pa...@gcc.gnu.org> Date: Mon Aug 11 21:34:07 2025 +0100 Fortran: gfortran rejects procedure binding on PDT [PR121398] 2025-08-11 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/121398 * resolve.cc (check_pdt_args): New function. (check_generic_tbp_ambiguity): Use it to ensure that args to typebound procedures that do not have the same declared type as the containing derived type have 'pass1/2' set to null. This avoids false ambiguity errors. (resolve_typebound_procedure): Do not generate a wrong type error for typebound procedures marked as pass if they are of a different declared type to the containing pdt_type. gcc/testsuite/ PR fortran/121398 * gfortran.dg/pdt_generic_1.f90: New test.