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

--- 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:b5d3675a8fc6d44fa52b7ed1c966c6815de5a9dc

commit r16-6494-gb5d3675a8fc6d44fa52b7ed1c966c6815de5a9dc
Author: Paul Thomas <[email protected]>
Date:   Mon Jan 5 07:05:36 2026 +0000

    Fortran: ICE in type-bound function with PDT result [PR 123071]

    2026-01-05  Paul Thomas  <[email protected]>

    gcc/fortran
            PR fortran/123071
            * resolve.cc (resolve_typebound_function): Make sure that the
            class declared type is resolved.
            (resolve_allocate_deallocate): Any kind of expr3 array ref will
            need resolution not just constant size refs.
            * trans-decl.cc (gfc_trans_deferred_vars): Exclude vtabs from
            initialization.
            (emit_not_set_warning): New function using code extracted from
            gfc_generate_function_code.
            (gfc_generate_function_code): PDT module procedures results
            that have not been referenced must have the fake_result_decl
            added to the symbol and emit_not_set_warning called. Likewise
            replace explicit code with call to emit_not_set_warning.

    gcc/testsuite
            PR fortran/123071
            * gfortran.dg/pdt_79.f03: New test.

Reply via email to