https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104650

--- Comment #6 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:4cb1f7fe1480b535e946361ab7e7a9ef82f8872c

commit r16-5612-g4cb1f7fe1480b535e946361ab7e7a9ef82f8872c
Author: Paul Thomas <[email protected]>
Date:   Wed Nov 26 06:59:20 2025 +0000

    Fortran: Implement finalization PDTs [PR104650]

    2025-11-26  Paul Thomas  <[email protected]>

    gcc/fortran
            PR fortran/104650
            * decl.cc (gfc_get_pdt_instance): If the PDT template has
            finalizers, make a new f2k_derived namespace for this intance
            and copy the template namespace into it. Set the instance
            template_sym field to point to the template.
            * expr.cc (gfc_check_pointer_assign): Allow array value pointer
            lvalues to point to scalar null expressions in initialization.
            * gfortran.h : Add the template_sym field to gfc_symbol.
            * resolve.cc (gfc_resolve_finalizers): For a pdt_type, copy the
            final subroutines with the same type argument into the pdt_type
            finalizer list. Prevent final subroutine type checking and
            creation of the vtab for pdt_templates.
            * symbol.cc (gfc_free_symbol): Do not call gfc_free_namespace
            for pdt_type with finalizers. Instead, free the finalizers and
            the namespace.

    gcc/testsuite
            PR fortran/104650
            * gfortran.dg/pdt_70.f03: New test.

Reply via email to