https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106606
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andre Vehreschild <ve...@gcc.gnu.org>: https://gcc.gnu.org/g:de915fbe3cb1ce7be35dce7d6bc8d04dc7125e61 commit r15-3711-gde915fbe3cb1ce7be35dce7d6bc8d04dc7125e61 Author: Andre Vehreschild <ve...@gcc.gnu.org> Date: Fri Aug 23 16:28:38 2024 +0200 Fortran: Break recursion building recursive types. [PR106606] Build a derived type component's type only, when it is not already being built and the component uses pointer semantics. gcc/fortran/ChangeLog: PR fortran/106606 * trans-types.cc (gfc_get_derived_type): Only build non-pointer derived types as component's types when they are not yet built. gcc/testsuite/ChangeLog: * gfortran.dg/recursive_alloc_comp_5.f90: New test.