[Bug fortran/123071] [PDT] ICE on invoking parent's type-bound function with PDT result
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 5 07:06:01 GMT 2026
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 <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:b5d3675a8fc6d44fa52b7ed1c966c6815de5a9dc
commit r16-6494-gb5d3675a8fc6d44fa52b7ed1c966c6815de5a9dc
Author: Paul Thomas <pault@gcc.gnu.org>
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 <pault@gcc.gnu.org>
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.
More information about the Gcc-bugs
mailing list