]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Break recursion building recursive types. [PR106606]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Fri, 23 Aug 2024 14:28:38 +0000 (16:28 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 19 Sep 2024 10:17:08 +0000 (12:17 +0200)
commitde915fbe3cb1ce7be35dce7d6bc8d04dc7125e61
treede666afa3abf4ed2d8bbc90c4576c371da58eea7
parent427f82425855fbcd2991578f3b83672b7512efbd
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.
gcc/fortran/trans-types.cc
gcc/testsuite/gfortran.dg/recursive_alloc_comp_5.f90 [new file with mode: 0644]