]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Allow PDT parameterized procedure pointer components [PR89707]
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 2 Sep 2025 20:51:33 +0000 (21:51 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Tue, 2 Sep 2025 20:51:33 +0000 (21:51 +0100)
commitf7dee170ba6d37aba6a9e1fa73711e4e03e42990
tree2ddcd8bbfdb4bb94e37625ed8bbe38ffe9736061
parent2d93be8907fa33f8791409490ed06e45de5c8420
Fortran: Allow PDT parameterized procedure pointer components [PR89707]

2025-09-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/89707
* decl.cc (gfc_get_pdt_instance): Copy the typebound procedure
field from the PDT template. If the template interface has
kind=0, provide the new instance with an interface with a type
spec that points to that of the parameterized component.
(match_ppc_decl): When 'saved_kind_expr' this is a PDT and the
expression should be copied to the component kind_expr.
* gfortran.h: Define gfc_get_tbp.

gcc/testsuite/
PR fortran/89707
* gfortran.dg/pdt_43.f03: New test.
gcc/fortran/decl.cc
gcc/fortran/gfortran.h
gcc/testsuite/gfortran.dg/pdt_43.f03 [new file with mode: 0644]